Bandwidth control method of integrated circuit, integrated circuit, electronic equipment and storage medium
By determining the performance requirement parameters and bandwidth thresholds of each hardware unit in the integrated circuit and dynamically adjusting the bus bandwidth, the problem of uneven bandwidth allocation when multiple hardware units perform tasks in parallel is solved, and the real-time performance requirements of the hardware unit are realized.
Patent Information
- Application Number
- CN202411545133.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-02-11
AI Technical Summary
In an integrated circuit, when multiple hardware units perform tasks in parallel, how to dynamically allocate bus bandwidth to meet the real-time performance requirements of each hardware unit.
By determining the performance requirement parameters corresponding to each hardware unit, the bandwidth threshold of each hardware unit is determined based on these parameters, and the bus bandwidth is dynamically adjusted through the bandwidth control unit to ensure that the bus bandwidth allocated to the hardware unit meets the real-time performance requirements of its execution tasks.
It realizes dynamic allocation of bus bandwidth to hardware units, so that the bus bandwidth allocated by each hardware unit can meet the real-time performance requirements of their tasks, and improves the performance of integrated circuits when performing multitasking in parallel.
Smart Images

Figure CN119415459A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of integrated circuits, and in particular to a bandwidth control method of an integrated circuit, an integrated circuit, an electronic device, and a storage medium. Background Art
[0002] In the field of integrated circuit technology, a hardware unit is a hardware structure in an integrated circuit that can independently perform tasks such as computing, storage, or data transmission. When performing tasks, a hardware unit can access hardware such as memory through a bus, such as reading instructions from memory or writing the results of executing instructions to memory.
[0003] Some complex integrated circuits may include multiple hardware units. In this case, the bus bandwidth of the integrated circuit may be allocated to the multiple hardware units for use, and each hardware unit may be allocated a portion of the bus bandwidth. Summary of the invention
[0004] When an integrated circuit includes multiple hardware units, the multiple hardware units can execute multiple tasks in parallel. Since different tasks have different real-time performance requirements, different hardware units have different requirements for bus bandwidth when executing different tasks. Therefore, how to dynamically allocate bus bandwidth to hardware units based on the real-time performance requirements of the hardware units to execute tasks has become a technical problem that needs to be solved urgently.
[0005] In order to solve the above technical problems, the present disclosure provides a bandwidth control method of an integrated circuit, an integrated circuit, an electronic device and a storage medium, which can dynamically allocate bus bandwidth to the hardware units of the integrated circuit so that the bus bandwidth allocated to the hardware units meets the real-time performance requirements of their task execution.
[0006] According to a first aspect of the present disclosure, a bandwidth control method for an integrated circuit is provided, the method comprising: determining a plurality of performance requirement parameters respectively corresponding to a plurality of hardware units in the integrated circuit; determining a first bandwidth threshold based on a first performance requirement parameter among the plurality of performance requirement parameters; wherein the first performance requirement parameter corresponds to a first hardware unit among the plurality of hardware units; determining a second bandwidth threshold based on at least one second performance requirement parameter among the plurality of performance requirement parameters; wherein the at least one second performance requirement parameter respectively corresponds to at least one second hardware unit other than the first hardware unit among the plurality of hardware units; determining a target bandwidth threshold corresponding to the first hardware unit based on the first bandwidth threshold and the second bandwidth threshold; and controlling the bandwidth of data transmitted by the first hardware unit through a bus based on the target bandwidth threshold.
[0007] According to a second aspect of the present disclosure, an integrated circuit is provided, comprising: a plurality of hardware units, for determining a plurality of performance requirement parameters respectively corresponding to the plurality of hardware units; a bandwidth control unit, for determining a first bandwidth threshold based on a first performance requirement parameter among the plurality of performance requirement parameters; wherein the first performance requirement parameter corresponds to a first hardware unit among the plurality of hardware units; the bandwidth control unit, for determining a second bandwidth threshold based on at least one second performance requirement parameter among the plurality of performance requirement parameters; wherein the at least one second performance requirement parameter respectively corresponds to at least one second hardware unit among the plurality of hardware units other than the first hardware unit; the bandwidth control unit, for determining a target bandwidth threshold corresponding to the first hardware unit based on the first bandwidth threshold and the second bandwidth threshold; the bandwidth control unit, for controlling the bandwidth of data transmitted by the first hardware unit through a bus based on the target bandwidth threshold.
[0008] According to a third aspect of the present disclosure, a computer storage medium is provided, wherein the storage medium stores a computer program, and the computer program is used to execute the bandwidth control method of the integrated circuit provided in the first aspect.
[0009] The fourth aspect of the present disclosure provides an electronic device, which includes: a processor; a memory for storing processor executable instructions; the processor is used to read the executable instructions from the memory and execute the instructions to implement the bandwidth control method of the integrated circuit provided in the first aspect above.
[0010] A fifth aspect of the present disclosure provides a computer program product. When instructions in the computer program product are executed by a processor, the bandwidth control method of the integrated circuit provided in the first aspect is executed.
[0011] The technical solution provided by the embodiment of the present disclosure, when determining multiple performance requirement parameters corresponding to multiple hardware units respectively, determines a first bandwidth threshold based on the first performance requirement parameter corresponding to the first hardware unit, so that the first bandwidth threshold matches the real-time performance requirement of the task executed by the first hardware unit. Determine the second bandwidth threshold based on the second performance requirement parameter corresponding to the second hardware unit, so that the second bandwidth threshold matches the real-time performance requirement of the task executed by the second hardware unit. On this basis, based on the first bandwidth threshold and the second bandwidth threshold, determine the target bandwidth threshold corresponding to the first hardware unit, so that the target bandwidth threshold can match both the real-time performance requirement of the task executed by the first hardware unit and the real-time performance requirement of the task executed by at least one second hardware unit. Next, based on the target bandwidth threshold, control the bandwidth of data transmitted by the first hardware unit through the bus, thereby realizing dynamic allocation of bus bandwidth to the first hardware unit, so that the bus bandwidth allocated to the first hardware unit meets the real-time performance requirement of its task execution. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 It is a schematic diagram of the structure of an integrated circuit provided by an exemplary embodiment of the present disclosure.
[0013] Figure 2 It is a schematic diagram of transmission performance requirement parameters of a hardware unit provided by an exemplary embodiment of the present disclosure.
[0014] Figure 3 It is a flowchart of a bandwidth control method of an integrated circuit provided by an exemplary embodiment of the present disclosure.
[0015] Figure 4 3 is a flow chart of step 303 of a bandwidth control method for an integrated circuit provided by an exemplary embodiment of the present disclosure.
[0016] Figure 5 It is a flowchart of step 3032 of a bandwidth control method for an integrated circuit provided by an exemplary embodiment of the present disclosure.
[0017] Figure 6 It is a flowchart diagram of step 304 of a bandwidth control method for an integrated circuit provided by an exemplary embodiment of the present disclosure.
[0018] Figure 7 3 is another flowchart diagram of step 304 of the bandwidth control method of an integrated circuit provided by an exemplary embodiment of the present disclosure.
[0019] Figure 8 3 is a flow chart of step 305 of a bandwidth control method for an integrated circuit provided by an exemplary embodiment of the present disclosure.
[0020] Fig. 9 It is a schematic diagram of the structure of a bandwidth control device of an integrated circuit provided by an exemplary embodiment of the present disclosure.
[0021] Fig.10 is another structural schematic diagram of a bandwidth control device for an integrated circuit provided by an exemplary embodiment of the present disclosure.
[0022] Fig.11 1 is a schematic diagram of the structure of an electronic device provided in a disclosed embodiment. DETAILED DESCRIPTION
[0023] To explain the present disclosure, example embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. It should be understood that the present disclosure is not limited to the example embodiments.
[0024] It should be noted that the relative arrangement of components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless specifically stated otherwise.
[0025] Application Overview
[0026] In the field of integrated circuit technology, a hardware unit can be a hardware structure in an integrated circuit that can independently perform tasks such as computing, storage, or data transmission. In some complex integrated circuits, such as a system on a chip (SoC), multiple hardware units may be included. For example, an integrated circuit may include multiple intellectual property (IP) cores, each of which corresponds to a hardware unit.
[0027] When an integrated circuit includes multiple hardware units, the multiple hardware units can access hardware such as memory through the bus of the integrated circuit to read and write data. In this case, the multiple hardware units can share the bus bandwidth of the integrated circuit, and the bus bandwidth of the integrated circuit can be allocated to the multiple hardware units for use.
[0028] When multiple hardware units of an integrated circuit execute multiple tasks in parallel, different tasks have different real-time performance requirements, where the real-time performance requirement of a task refers to the requirement to complete the task within a specific time limit. Generally speaking, the shorter the time limit required to complete a task, the higher the real-time performance requirement of the task, and vice versa.
[0029] When executing a task, each hardware unit will access hardware such as memory through the bus to read and write related data, such as reading instructions from the memory or writing the results of executing instructions to the memory. It is understandable that the larger the bus bandwidth allocated to the hardware unit, the faster the hardware unit accesses the memory through the bus, the less time it takes, and the shorter the time it takes for the hardware unit to complete the task.
[0030] Usually, the real-time performance requirements of each task are dynamically changing. For example, if the time limit for hardware unit A to complete a task is 100ms, it means that the real-time performance requirements of the task are not high. However, if hardware unit A does not get enough bus bandwidth during the execution of the task, the progress of hardware unit A in executing the task will be slow, resulting in hardware unit A needing to complete most of the processing of the task at the end of the time limit, for example, 90% of the processing of the task needs to be completed within the last 10ms of the time limit. In this case, the task becomes a task with very high real-time performance requirements.
[0031] It can be seen that how to dynamically allocate bus bandwidth to hardware units based on the dynamically changing real-time performance requirements when the hardware units execute tasks has become a technical problem that needs to be solved urgently.
[0032] In order to solve the above technical problems, the embodiment of the present disclosure provides a bandwidth control method for an integrated circuit, which determines the target bandwidth thresholds corresponding to each hardware unit (e.g., the first hardware unit) based on the performance requirement parameters corresponding to each hardware unit, and controls the bandwidth of data transmitted by each hardware unit through a bus based on the target bandwidth thresholds corresponding to each hardware unit. The method realizes dynamic allocation of bus bandwidth to each hardware unit, so that the bus bandwidth allocated to each hardware unit meets the real-time performance requirements of the tasks executed by each hardware unit.
[0033] Exemplary Systems
[0034] An embodiment of the present disclosure provides an integrated circuit.
[0035] Figure 1 It is a schematic diagram of the structure of an integrated circuit provided by an exemplary embodiment of the present disclosure.
[0036] like Figure 1 As shown, the integrated circuit may include multiple hardware units. The embodiment of the present disclosure does not limit the number of hardware units in the integrated circuit. Each hardware unit may be a hardware structure in the integrated circuit that can independently perform tasks. Exemplarily, the integrated circuit may include multiple IP cores, each IP core corresponding to a hardware unit. Exemplarily, the hardware unit may be a central processing unit (CPU), a graphics processing unit (GPU), a neural processing unit (NPU), a digital signal processor (DSP), etc.
[0037] Exemplarily, multiple operating systems may be run on the integrated circuit. The multiple operating systems may be run on different hardware units or on the same hardware unit, which is not limited in the embodiments of the present disclosure. The multiple operating systems may include, for example, a first operating system and a second operating system, the first operating system may be a cockpit system of an intelligent driving car, and the second operating system may be an intelligent driving system of an intelligent driving car.
[0038] like Figure 1 As shown, the integrated circuit may further include a bus and a plurality of bandwidth control units. In the embodiment of the present disclosure, the bandwidth control unit is a hardware structure in the integrated circuit, and each bandwidth control unit may correspond to at least one hardware unit. Figure 1 An example is given for illustrative description, in which each bandwidth control unit corresponds to one hardware unit.
[0039] Exemplarily, the integrated circuit includes hardware unit A, hardware unit B and hardware unit C. For example, hardware unit A is a CPU, hardware unit B is a GPU, and hardware unit C is an NPU. Correspondingly, the integrated circuit also includes a bandwidth control unit a, a bandwidth control unit b and a bandwidth control unit c. Among them, hardware unit A corresponds to bandwidth control unit a, hardware unit B corresponds to bandwidth control unit b, and hardware unit C corresponds to bandwidth control unit c. That is, each hardware unit has its corresponding bandwidth control unit, and different hardware units correspond to different bandwidth control units.
[0040] In the embodiments of the present disclosure, when a hardware unit corresponding to any bandwidth control unit transmits data through a bus, for example, when a hardware unit corresponding to the bandwidth control unit accesses hardware such as a memory through a bus to read instructions in the memory or write the results of executing instructions into the memory, the bandwidth control unit can control the bandwidth of data transmitted by the corresponding hardware unit through the bus.
[0041] In one embodiment, each hardware unit can generate a performance requirement parameter corresponding to each hardware unit based on the real-time performance requirements of the tasks it performs. In the disclosed embodiment, the performance requirement parameter corresponding to the hardware unit is used to characterize the hardware unit's demand for bus bandwidth.
[0042] It should be noted here that in the field of integrated circuit technology, bandwidth refers to the amount of data transmitted per unit time. For example, bus bandwidth refers to the amount of data transmitted per unit time on the bus. The unit of bandwidth can be bits per second (bps), kilobits per second (kbps), megabits per second (Mbps), gigabits per second (Gbps), etc. Correspondingly, the unit of bandwidth threshold can also be bps, kbps, Mbps, Gbps, etc.
[0043] The hardware unit may generate the performance requirement parameters periodically, or may generate the performance requirement parameters when the real-time performance requirements of the tasks executed by the hardware unit change, which is not limited in the embodiments of the present disclosure.
[0044] Exemplarily, the performance requirement parameter may include a performance requirement parameter value, wherein a larger performance requirement parameter value indicates a higher bus bandwidth requirement of the hardware unit, and a smaller performance requirement parameter value indicates a lower bus bandwidth requirement of the hardware unit.
[0045] Exemplarily, the performance requirement parameter value may be a bit value of a preset bit length, wherein the preset bit length may be, for example, 3 bits, 4 bits, 5 bits, 6 bits, 7 bits, 8 bits, 16 bits, etc., which is not limited in the embodiments of the present disclosure.
[0046] In the disclosed embodiment, the performance requirement parameter corresponding to the hardware unit corresponds to the real-time performance requirement of the task executed by the hardware unit. The real-time performance requirement of the task refers to the requirement to complete the task within a specific time limit. The shorter the time limit for completing a task, the higher the real-time performance requirement of the task. The longer the time limit for completing a task, the lower the real-time performance requirement of the task.
[0047] Accordingly, when a hardware unit executes a task with high real-time performance requirements, in order to reduce the time required to execute the task, the hardware unit needs to reduce the time required to read the data required to execute the task from the memory through the bus, and reduce the time required to write the execution result of the task to the memory through the bus. Therefore, the hardware unit has a high demand for memory bandwidth, and the performance requirement parameter value generated by the hardware unit is large. In other words, the higher the real-time performance requirements of the task executed by the hardware unit, the larger the performance requirement parameter value corresponding to the hardware unit.
[0048] Similarly, when a hardware unit executes a task with low real-time performance requirements, the hardware unit does not need to complete reading the data required to execute the task from the memory through the bus in a short time, nor does it need to complete writing the execution result of the task to the memory through the bus in a short time. Therefore, the hardware unit has a low demand for memory bandwidth, and the performance requirement parameter value generated by the hardware unit is small. In other words, the lower the real-time performance requirements of the task executed by the hardware unit, the smaller the performance requirement parameter value corresponding to the hardware unit.
[0049] Generally speaking, during the execution of a task by a hardware unit, the real-time performance requirements of the task change dynamically. Therefore, the demand for memory bandwidth of the hardware unit during the execution of the task also changes dynamically. By way of example, hardware unit A is a CPU, hardware unit B is a GPU, and hardware unit C is an NPU. The total bus bandwidth is 100Gbps, of which the bus bandwidth allocated to hardware unit A is 40Gbps, the bus bandwidth allocated to hardware unit B is 30Gbps, and the bus bandwidth allocated to hardware unit C is 30Gbps. On this basis, taking the example of hardware unit A performing video decoding tasks, hardware unit B performing environment rendering tasks in intelligent driving scenarios, and hardware unit C performing route planning tasks in intelligent driving scenarios, the reasons why the bus bandwidth allocated to the hardware unit cannot meet the real-time performance requirements of the tasks performed by the hardware unit are explained exemplarily.
[0050] In the first example, taking the video decoding task performed by hardware unit A as an example, when the video bit rate is low, the amount of data that hardware unit A needs to decode is small, so hardware unit A accesses less memory, and thus has a lower demand for bus bandwidth. At this time, a bus bandwidth of 40Gbps can meet the real-time performance requirements of the video decoding task. When the video bit rate increases or the content in the video changes significantly in a short period of time, the amount of data that hardware unit A needs to decode increases, and hardware unit A accesses more memory, and thus has a higher demand for bus bandwidth, resulting in a bus bandwidth of 40Gbps failing to meet the real-time performance requirements of the video decoding task.
[0051] In the second example, taking the hardware unit B performing the environment rendering task in the intelligent driving scenario as an example, when the number of vehicles and pedestrians in the environment is small, the hardware unit B needs to render less content (including vehicles, pedestrians, etc.), so the hardware unit B has less access to the memory, and thus the demand for bus bandwidth is low. At this time, the 30Gbps bus bandwidth can meet the real-time performance requirements of the environment rendering task. When the number of vehicles and pedestrians in the environment is large (such as when a vehicle drives to an intersection), the content that the hardware unit B needs to render increases, so the hardware unit B's access to the memory increases, and then the demand for bus bandwidth increases, resulting in a bus bandwidth of 30Gbps that cannot meet the real-time performance requirements of the environment rendering task.
[0052] In the third example, taking the hardware unit C executing the route planning task in the intelligent driving scenario as an example, when the vehicle is driving on an elevated section, due to the simple road conditions, the hardware unit C needs to make fewer decisions such as lane changes, avoidance, acceleration and deceleration, so the hardware unit C has fewer accesses to the memory, and thus the demand for bus bandwidth is low. At this time, the 30Gbps bus bandwidth can meet the real-time performance requirements of the route planning task. When the vehicle is driving on more sections of the urban area, due to the complex road conditions, the hardware unit C needs to make more decisions such as lane changes, avoidance, acceleration and deceleration, so the hardware unit C has more accesses to the memory, and thus the demand for bus bandwidth increases, resulting in the 30Gbps bus bandwidth being unable to meet the real-time performance requirements of the route planning task.
[0053] As can be seen from the above examples, the memory bandwidth requirements of each hardware unit during the execution of the task are dynamically changing. Therefore, if the bus bandwidth is statically allocated to the hardware unit, the bus bandwidth allocated to the hardware unit will not meet the real-time performance requirements of the task executed by the hardware unit.
[0054] After generating the corresponding performance requirement parameters, each hardware unit may transmit the corresponding performance requirement parameters to the multiple bandwidth control units. Accordingly, each bandwidth control unit may obtain multiple performance requirement parameters, wherein the multiple performance requirement parameters include the performance requirement parameters generated by at least one hardware unit among the multiple hardware units in the integrated circuit.
[0055] For example, Figure 2 As shown, an integrated circuit includes hardware unit A, hardware unit B, hardware unit C, bandwidth control unit a, bandwidth control unit b and bandwidth control unit c as an example. Among them, hardware unit A corresponds to bandwidth control unit a, hardware unit B corresponds to bandwidth control unit b, and hardware unit C corresponds to bandwidth control unit c. The multiple performance requirement parameters include performance requirement parameters corresponding to hardware unit A, performance requirement parameters corresponding to hardware unit B and / or performance requirement parameters corresponding to hardware unit C.
[0056] For example, Figure 2 As shown, after hardware unit A generates performance requirement parameter 1, it can transmit performance requirement parameter 1 to the corresponding bandwidth control unit a, and can also transmit performance requirement parameter 1 to bandwidth control unit b corresponding to hardware unit B and / or bandwidth control unit c corresponding to hardware unit C. After hardware unit B generates performance requirement parameter 2, it can transmit performance requirement parameter 2 to the corresponding bandwidth control unit b, and can also transmit performance requirement parameter 2 to bandwidth control unit a corresponding to hardware unit A and / or bandwidth control unit c corresponding to hardware unit C. And so on.
[0057] Exemplarily, each hardware unit may transmit the corresponding performance requirement parameters to multiple bandwidth control units in different ways, which is not limited in the embodiments of the present disclosure. For example, each hardware unit may directly transmit the performance requirement parameters to multiple bandwidth control units through a circuit between the hardware units and the multiple bandwidth control units. For another example, each hardware unit may write the corresponding performance requirement parameters into the shared space of the register, and each bandwidth control unit may read the multiple performance requirement parameters corresponding to the multiple hardware units from the shared space of the register.
[0058] To facilitate the subsequent description of the correspondence between multiple bandwidth control units, multiple hardware units and multiple performance requirement parameters, the hardware unit corresponding to any one of the multiple bandwidth control units is referred to as the first hardware unit, and the other hardware units except the first hardware unit are referred to as the second hardware unit. Exemplarily, taking bandwidth control unit a as an example, hardware unit A is the first hardware unit, and hardware unit B and hardware unit C are the second hardware unit. Taking bandwidth control unit b as an example, hardware unit B is the first hardware unit, and hardware unit A and hardware unit C are the second hardware unit. In addition, the performance requirement parameter corresponding to the first hardware unit is referred to as the first performance requirement parameter, and the performance requirement parameter corresponding to the second hardware unit is referred to as the second performance requirement parameter.
[0059] Next, when the first hardware unit corresponding to any bandwidth control unit transmits data through the bus, for example, when the first hardware unit accesses the memory through the bus, the bandwidth control unit can control the bandwidth of the first hardware unit transmitting data through the bus based on the performance requirement parameters corresponding to the multiple hardware units obtained.
[0060] Exemplarily, the bandwidth control unit may determine a first bandwidth threshold based on a first performance requirement parameter corresponding to the first hardware unit, and determine a second bandwidth threshold based on at least one second performance requirement parameter corresponding to at least one second hardware unit. Next, the bandwidth control unit may determine a target bandwidth threshold corresponding to the first hardware unit based on the first bandwidth threshold and the second bandwidth threshold, and control the bandwidth of data transmitted by the first hardware unit through the bus based on the target bandwidth threshold. For ease of description, the bandwidth of data transmitted by the first hardware unit through the bus may be referred to as the first bandwidth below.
[0061] In the disclosed embodiment, the first bandwidth threshold is determined based on the first performance requirement parameter corresponding to the first hardware unit, so that the first bandwidth threshold can match the real-time performance requirement of the task executed by the first hardware unit. Therefore, if the first bandwidth is controlled based on the first bandwidth threshold, the real-time performance requirement of the task executed by the first hardware unit can be met, but the bus bandwidth allocated to the second hardware unit may be too small, and the real-time performance requirement of the task executed by the second hardware unit cannot be met.
[0062] Similarly, determining the second bandwidth threshold based on at least one second performance requirement parameter corresponding to at least one second hardware unit can match the second bandwidth threshold with the real-time performance requirement of the task executed by at least one second hardware unit. Therefore, if the first bandwidth is controlled based on the second bandwidth threshold, the real-time performance requirement of the task executed by the first hardware unit may not be met, but the real-time performance requirement of the task executed by at least one second hardware unit can be met.
[0063] Based on this, the embodiment of the present disclosure takes into account the real-time performance requirements of the tasks performed by the first hardware unit and the real-time performance requirements of the tasks performed by at least one second hardware unit. Based on the first bandwidth threshold and the second bandwidth threshold, the target bandwidth threshold corresponding to the first hardware unit is determined, and based on the target bandwidth threshold, the bandwidth of the first hardware unit transmitting data through the bus is controlled, so that the allocation of the bus bandwidth is more reasonable, so that the bus bandwidth obtained by the first hardware unit can meet the real-time performance requirements of the tasks it performs.
[0064] Exemplary Methods
[0065] Figure 3 1 is a flow chart of a bandwidth control method for an integrated circuit provided by an exemplary embodiment of the present disclosure. This embodiment can be applied to an integrated circuit, such as Figure 3 As shown, the following steps are included:
[0066] Step 301 , determining a plurality of performance requirement parameters corresponding to a plurality of hardware units in an integrated circuit.
[0067] In one embodiment, multiple hardware units can generate performance requirement parameters corresponding to each of the multiple hardware units based on their respective real-time performance requirements. The real-time performance requirements of the tasks executed by the hardware units correspond to the performance requirement parameters corresponding to the hardware units, and different real-time performance requirements correspond to different performance requirement parameters.
[0068] Among them, each hardware unit can generate performance requirement parameters based on different methods. In one example, each hardware unit can generate performance requirement parameters periodically. In another example, each hardware unit can generate performance requirement parameters when its respective real-time performance requirements change. The embodiment of the present disclosure does not limit the manner in which each hardware unit generates performance requirement parameters.
[0069] Exemplarily, the performance requirement parameter may include a performance requirement parameter value. Different real-time performance requirements correspond to different performance requirement parameter values. The higher the real-time performance requirement, the larger the corresponding performance requirement parameter value, and the lower the real-time performance requirement, the smaller the corresponding performance requirement parameter value.
[0070] Exemplarily, the performance requirement parameter value may be a bit value of a preset bit length. The preset bit length may be, for example, 3 bits, 4 bits, 5 bits, 6 bits, 7 bits, 8 bits, 16 bits, etc., which is not limited in the embodiments of the present disclosure. Taking the performance requirement parameter value as a 4-bit bit value as an example, the performance requirement parameter value may range from 0000 to 1111.
[0071] In some embodiments, the performance requirement parameter may also be described as an urgency parameter, such as a hurrylevel parameter. Accordingly, the performance requirement parameter value may also be described as an urgency level value, such as a hurrylevel value, etc. This is not limited in the embodiments of the present disclosure.
[0072] Step 302: Determine a first bandwidth threshold based on a first performance requirement parameter among a plurality of performance requirement parameters.
[0073] The first performance requirement parameter refers to a performance requirement parameter generated by a first hardware unit corresponding to any bandwidth control unit among the multiple bandwidth control units. In other words, the first performance requirement parameter corresponds to the first hardware unit.
[0074] For example, Figure 2 As shown, the hardware unit A corresponds to the bandwidth control unit a. Therefore, for the bandwidth control unit a, the first hardware unit is the hardware unit A, and the first performance requirement parameter is the performance requirement parameter 1 corresponding to the hardware unit A.
[0075] For example, Figure 2 As shown, the hardware unit B corresponds to the bandwidth control unit b. Therefore, for the bandwidth control unit b, the first hardware unit is the hardware unit B, and the first performance requirement parameter is the performance requirement parameter 2 corresponding to the hardware unit B.
[0076] For example, Figure 2 As shown, the hardware unit C corresponds to the bandwidth control unit c. Therefore, for the bandwidth control unit c, the first hardware unit is the hardware unit C, and the first performance requirement parameter is the performance requirement parameter 3 corresponding to the hardware unit C.
[0077] There is a corresponding relationship between the multiple performance requirement parameters and the multiple bandwidth thresholds. For example, each performance requirement parameter may correspond to a bandwidth threshold, and different performance requirement parameters correspond to different bandwidth thresholds.
[0078] In one embodiment, the bandwidth control unit may determine the first bandwidth threshold corresponding to the first performance requirement parameter based on the correspondence between the multiple performance requirement parameters and the multiple bandwidth thresholds.
[0079] Exemplarily, the correspondence between the multiple performance requirement parameters and the multiple bandwidth thresholds may be stored in a register of the integrated circuit. The bandwidth control unit may read the correspondence between the multiple performance requirement parameters and the multiple bandwidth thresholds from the register to determine the first bandwidth threshold corresponding to the first performance requirement parameter.
[0080] Exemplarily, the bandwidth threshold may be directly indicated by a performance requirement parameter. For example, the performance requirement parameter may include the bandwidth threshold. For another example, the performance requirement parameter may be mapped to the bandwidth threshold by an algorithm. The embodiment of the present disclosure does not limit the manner in which the performance requirement parameter indicates the bandwidth threshold.
[0081] The unit of the bandwidth threshold may also be bps, kbps, Mbps, Gbps, etc.
[0082] In one embodiment, the first bandwidth threshold is used to indicate a lower bandwidth limit value of the first bandwidth.
[0083] The first bandwidth is a bandwidth for the first hardware unit to transmit data through the bus.
[0084] It is understandable that, since the first bandwidth threshold is determined based on the first performance requirement parameter corresponding to the first hardware unit, the first bandwidth threshold matches the real-time performance requirement of the task executed by the first hardware unit. In other words, in order to meet the real-time performance requirement, the first hardware unit hopes that the first bandwidth of the first hardware unit can be greater than or equal to the first bandwidth threshold. However, if the first bandwidth is controlled based on the first bandwidth threshold, for example, the first bandwidth is controlled to be greater than or equal to the first bandwidth threshold, although the real-time performance requirement of the task executed by the first hardware unit can be met, it may result in too little bus bandwidth allocated to the second hardware unit, and the real-time performance requirement of the task executed by the second hardware unit cannot be met.
[0085] Step 303: Determine a second bandwidth threshold based on at least one second performance requirement parameter among the multiple performance requirement parameters.
[0086] The at least one second performance requirement parameter refers to a performance requirement parameter generated by at least one second hardware unit other than the first hardware unit among the multiple hardware units. That is, the at least one second performance requirement parameter corresponds to the at least one second hardware unit.
[0087] In one embodiment, the bandwidth control unit may determine at least one bandwidth threshold corresponding to at least one second performance requirement parameter based on the correspondence between multiple performance requirement parameters and multiple bandwidth thresholds, and then determine the second bandwidth threshold based on the at least one bandwidth threshold.
[0088] The specific manner in which the bandwidth control unit determines the second bandwidth threshold based on at least one second performance requirement parameter among the multiple performance requirement parameters will be described in detail in subsequent embodiments. Figure 4 Further explanation.
[0089] In one embodiment, the second bandwidth threshold is used to indicate a bandwidth upper limit value of the first bandwidth.
[0090] It is understandable that, since the second bandwidth threshold is determined based on at least one second performance requirement parameter corresponding to at least one second hardware unit, the second bandwidth threshold matches the real-time performance requirement of the task executed by the at least one second hardware unit. In other words, in order to meet the real-time performance requirement, at least one second hardware unit hopes that the first bandwidth can be less than or equal to the second bandwidth threshold so that the remaining bus bandwidth can be allocated to the second hardware unit for use. However, if the first bandwidth is controlled based on the second bandwidth threshold, for example, the first bandwidth is controlled to be less than or equal to the second bandwidth threshold, although the real-time performance requirement of the task executed by the at least one second hardware unit can be met, it may result in too little bus bandwidth allocated to the first hardware unit, and the real-time performance requirement of the task executed by the first hardware unit cannot be met.
[0091] Step 304: Determine a target bandwidth threshold corresponding to the first hardware unit based on the first bandwidth threshold and the second bandwidth threshold.
[0092] In one embodiment, the bandwidth control unit can determine the target bandwidth threshold based on the numerical relationship between the first bandwidth threshold and the second bandwidth threshold, for example: the size of the first bandwidth threshold and the second bandwidth threshold, or the difference between the first bandwidth threshold and the second bandwidth threshold, or the ratio of the first bandwidth threshold and the second bandwidth threshold, etc.
[0093] Exemplarily, the target bandwidth threshold may be the first bandwidth threshold, may be the second bandwidth threshold, or may be other values determined based on the first bandwidth threshold and the second bandwidth threshold, which is not limited in the embodiments of the present disclosure.
[0094] The specific manner in which the bandwidth control unit determines the target bandwidth threshold corresponding to the first hardware unit based on the first bandwidth threshold and the second bandwidth threshold will be described in detail in subsequent embodiments. Figure 6 Further explanation.
[0095] Step 305: Based on the target bandwidth threshold, control the bandwidth of data transmitted by the first hardware unit through the bus.
[0096] In one embodiment, the target bandwidth threshold is used to indicate a bandwidth upper limit value of the first bandwidth. The bandwidth control unit may control the first bandwidth to be less than or equal to the target bandwidth threshold based on the target bandwidth threshold.
[0097] The specific manner in which the bandwidth control unit controls the bandwidth of data transmitted by the first hardware unit through the bus based on the target bandwidth threshold will be described in detail in subsequent embodiments. Figure 8 Further explanation.
[0098] It should be noted that in the embodiment of the present disclosure, when the integrated circuit includes multiple bandwidth control units, the multiple bandwidth control units can execute steps 302 to 305 in parallel. When different bandwidth control units execute steps 302 to 305, the first hardware unit and the second hardware unit are also different.
[0099] For example, Figure 2 As shown, when bandwidth control unit a performs step 302 to step 305, the first hardware unit is hardware unit A, and the second hardware unit is hardware unit B and hardware unit C. When bandwidth control unit b performs step 302 to step 305, the first hardware unit is hardware unit B, and the second hardware unit is hardware unit A and hardware unit C. When bandwidth control unit c performs step 302 to step 305, the first hardware unit is hardware unit C, and the second hardware unit is hardware unit A and hardware unit B.
[0100] Accordingly, since different bandwidth control units correspond to different first hardware units, when different bandwidth control units execute steps 302 to 305, they can determine the target bandwidth thresholds corresponding to different hardware units and control the bandwidths of data transmitted by different hardware units through the bus.
[0101] Exemplarily, bandwidth control unit a executes steps 302 to 305, and can control the bandwidth of data transmitted by hardware unit A through the bus based on the target bandwidth threshold M1 corresponding to hardware unit A. Bandwidth control unit b executes steps 302 to 305, and can control the bandwidth of data transmitted by hardware unit B through the bus based on the target bandwidth threshold M2 corresponding to hardware unit B. Bandwidth control unit c executes steps 302 to 305, and can control the bandwidth of data transmitted by hardware unit C through the bus based on the target bandwidth threshold M3 corresponding to hardware unit C.
[0102] It can be seen from the above technical solutions that the method provided by the embodiment of the present disclosure, when determining multiple performance requirement parameters corresponding to multiple hardware units respectively, determines a first bandwidth threshold based on the first performance requirement parameter corresponding to the first hardware unit, so that the first bandwidth threshold matches the real-time performance requirement of the task performed by the first hardware unit. Determine the second bandwidth threshold based on the second performance requirement parameter corresponding to the second hardware unit, so that the second bandwidth threshold matches the real-time performance requirement of the task performed by the second hardware unit. On this basis, based on the first bandwidth threshold and the second bandwidth threshold, determine the target bandwidth threshold corresponding to the first hardware unit, so that the target bandwidth threshold can match both the real-time performance requirement of the task performed by the first hardware unit and the real-time performance requirement of the task performed by at least one second hardware unit. Next, based on the target bandwidth threshold, control the bandwidth of the data transmitted by the first hardware unit through the bus. Dynamic allocation of bus bandwidth to the first hardware unit is achieved, so that the bus bandwidth allocated to the first hardware unit meets the real-time performance requirements of its task execution.
[0103] like Figure 4 As shown in the above Figure 3 Based on the illustrated embodiment, step 303 may include the following steps:
[0104] Step 3031, determining the number of second performance requirement parameters among the multiple performance requirement parameters.
[0105] Exemplarily, when a second hardware unit generates a second performance requirement parameter, or when a second hardware unit transmits a second performance requirement parameter to a bandwidth control module, the bandwidth control unit can obtain a second performance requirement parameter, and therefore, the bandwidth control unit can determine that the number of second performance requirement parameters is one.
[0106] Exemplarily, when multiple second hardware units generate second performance requirement parameters, or when multiple second hardware units transmit second performance requirement parameters to the bandwidth control module respectively, the bandwidth control unit can obtain multiple second performance requirement parameters, and therefore, the bandwidth control unit can determine that the number of second performance requirement parameters is multiple.
[0107] Step 3032: Determine a second bandwidth threshold based on the number of second performance requirement parameters in the multiple performance requirement parameters and a bandwidth threshold corresponding to at least one second performance requirement parameter.
[0108] In response to the number of the second performance requirement parameters being one or more, the bandwidth control unit may determine the second bandwidth threshold in different ways based on the bandwidth threshold corresponding to each of the at least one second performance requirement parameters.
[0109] The bandwidth control unit determines the specific manner of the second bandwidth threshold based on the number of the second performance requirement parameters in the multiple performance requirement parameters and the bandwidth threshold corresponding to each of the at least one second performance requirement parameters, which will be described in detail in the subsequent embodiments. Figure 5 Further explanation.
[0110] In the embodiment of the present disclosure, considering that different numbers of second performance requirement parameters correspond to different numbers of bandwidth thresholds, the number of bandwidth thresholds will affect the method of determining the second bandwidth threshold. Therefore, the number of second performance requirement parameters among multiple performance requirement parameters is first determined, and then the second bandwidth threshold is determined based on the number of second performance requirement parameters and the bandwidth threshold corresponding to at least one second performance requirement parameter, so that the second bandwidth threshold is more matched with the real-time performance requirements of the tasks performed by one or more second hardware units.
[0111] like Figure 5 As shown in the above Figure 4 Based on the illustrated embodiment, step 3032 may include the following steps:
[0112] Step 30321: In response to the number of the second performance requirement parameter in the multiple performance requirement parameters being one, determine a second bandwidth threshold based on the bandwidth threshold corresponding to the second performance requirement parameter in the multiple performance requirement parameters.
[0113] In one embodiment, determining the second bandwidth threshold based on the bandwidth threshold corresponding to the second performance requirement parameter includes: determining the bandwidth threshold corresponding to the second performance requirement parameter as the second bandwidth threshold. Exemplarily, if the bandwidth threshold corresponding to the second performance requirement parameter is 30 Gbps, then the second bandwidth threshold is 30 Gbps.
[0114] In one embodiment, determining the second bandwidth threshold based on the bandwidth threshold corresponding to the second performance requirement parameter includes: adjusting the bandwidth threshold corresponding to the second performance requirement parameter to obtain the second bandwidth threshold. The adjustment of the bandwidth threshold corresponding to the second performance requirement parameter includes, but is not limited to, increasing or decreasing the bandwidth threshold corresponding to the second performance requirement parameter, for example, adding or subtracting the bandwidth threshold corresponding to the second performance requirement parameter from the corresponding compensation value, which is not limited in the embodiments of the present disclosure.
[0115] Step 30322: In response to the number of the second performance requirement parameters in the plurality of performance requirement parameters being plural, determine a size relationship between the plurality of second performance requirement parameters in the plurality of performance requirement parameters.
[0116] In one embodiment, determining the size relationship of the plurality of second performance requirement parameters includes: determining the size relationship of the performance requirement parameter values corresponding to the plurality of second performance requirement parameters.
[0117] Step 30323: Determine a target performance requirement parameter from the multiple second performance requirement parameters based on the size relationship of the multiple second performance requirement parameters.
[0118] In one embodiment, based on the magnitude relationship of the plurality of second performance requirement parameters, determining the target performance requirement parameter from the plurality of second performance requirement parameters includes:
[0119] First, based on the magnitude relationship among the plurality of second performance requirement parameters, a maximum performance requirement parameter is determined from the plurality of second performance requirement parameters.
[0120] For example, taking the number of second performance requirement parameters as three, if the performance requirement parameter value in the second performance requirement parameter c1 is 0003, the performance requirement parameter value in the second performance requirement parameter c2 is 0100, and the performance requirement parameter value in the second performance requirement parameter c3 is 0111, then it can be determined that the second performance requirement parameter c3 is the maximum performance requirement parameter.
[0121] Next, based on the maximum performance requirement parameter, the target performance requirement parameter is determined.
[0122] In one implementation, determining the target performance requirement parameter based on the maximum performance requirement parameter includes: determining the maximum performance requirement parameter as the target performance requirement parameter. Exemplarily, if the performance requirement parameter value in the maximum performance requirement parameter is 0111, then the performance requirement parameter value in the target performance requirement parameter is 0111.
[0123] In one implementation, based on the maximum performance requirement parameter, determining the target performance requirement parameter includes: adjusting the maximum performance requirement parameter to obtain the target performance requirement parameter. Exemplarily, adjusting the maximum performance requirement parameter includes but is not limited to increasing or decreasing the performance requirement parameter value in the maximum performance requirement parameter, for example, adding or subtracting the maximum performance requirement parameter from the corresponding compensation value, which is not limited in the embodiments of the present disclosure.
[0124] Step 30324: Determine a second bandwidth threshold based on the bandwidth threshold corresponding to the target performance requirement parameter.
[0125] In one embodiment, since there is a correspondence between multiple performance requirement parameters and multiple bandwidth thresholds, the bandwidth control unit may determine the bandwidth threshold corresponding to the target performance requirement parameter based on the correspondence between the multiple performance requirement parameters and the multiple bandwidth thresholds.
[0126] Exemplarily, the bandwidth control unit may read the correspondence between multiple performance requirement parameters and multiple bandwidth thresholds from a register to determine the bandwidth threshold corresponding to the target performance requirement parameter.
[0127] In one embodiment, determining the second bandwidth threshold based on the bandwidth threshold corresponding to the target performance requirement parameter includes: determining the bandwidth threshold corresponding to the target performance requirement parameter as the second bandwidth threshold. Exemplarily, if the bandwidth threshold corresponding to the target performance requirement parameter is 30 Gbps, then the second bandwidth threshold is 30 Gbps.
[0128] In one embodiment, determining the second bandwidth threshold based on the bandwidth threshold corresponding to the target performance requirement parameter includes: adjusting the bandwidth threshold corresponding to the target performance requirement parameter to obtain the second bandwidth threshold. Exemplarily, adjusting the bandwidth threshold corresponding to the target performance requirement parameter includes but is not limited to increasing or decreasing the performance requirement parameter value in the maximum performance requirement parameter, for example, adding or subtracting the performance requirement parameter value from the corresponding compensation value, which is not limited in the embodiments of the present disclosure.
[0129] In the embodiment of the present disclosure, when the number of the second performance requirement parameters is one, the second bandwidth threshold is determined based on the bandwidth threshold corresponding to the second performance requirement parameter, so that the second bandwidth threshold matches the real-time performance requirement of the task executed by the second hardware unit. When the number of the second performance requirement parameters is multiple, the second performance threshold is determined based on the maximum performance requirement parameter among the multiple second performance requirement parameters, so that the second bandwidth threshold matches the highest real-time performance requirement among the multiple second hardware units. In this way, the target bandwidth threshold determined subsequently can better match the real-time performance requirements of the tasks executed by each second hardware unit.
[0130] like Figure 6 As shown in the above Figure 3 Based on the illustrated embodiment, step 304 may include the following steps:
[0131] Step 3041: Determine the magnitude relationship between the first bandwidth threshold and the second bandwidth threshold.
[0132] The magnitude relationship between the first bandwidth threshold and the second bandwidth threshold may include any one of the following:
[0133] The first size relationship: the first bandwidth threshold is greater than the second bandwidth threshold;
[0134] The second size relationship: the first bandwidth threshold is smaller than the second bandwidth threshold;
[0135] The third size relationship: the first bandwidth threshold is equal to the second bandwidth threshold.
[0136] Step 3042: Determine a target bandwidth threshold based on the magnitude relationship between the first bandwidth threshold and the second bandwidth threshold.
[0137] In one embodiment, when the first bandwidth threshold is greater than the second bandwidth threshold, the target bandwidth threshold may be determined based on the first bandwidth threshold.
[0138] Exemplarily, if the first bandwidth threshold is 50 Gbps and the second bandwidth threshold is 30 Gbps, the first bandwidth threshold is greater than the second bandwidth threshold. Then, the target bandwidth threshold may be determined based on the first bandwidth threshold.
[0139] In one implementation, determining the target bandwidth threshold based on the first bandwidth threshold includes: determining the first bandwidth threshold as the target bandwidth threshold.
[0140] Exemplarily, if the first bandwidth threshold is 50 Gbps, then the target bandwidth threshold is 50 Gbps.
[0141] In another implementation, determining the target bandwidth threshold based on the first bandwidth threshold includes: adjusting the first bandwidth threshold to obtain the target bandwidth threshold.
[0142] In one example, the first bandwidth threshold and the corresponding compensation value may be added or subtracted to obtain the target bandwidth threshold. Exemplarily, the compensation value corresponding to the first bandwidth threshold may be 5 Gbps, 10 Gbps, etc., which is not limited in the embodiments of the present disclosure. The compensation value corresponding to the first bandwidth threshold may be pre-configured or may change dynamically based on different tasks performed by the first hardware unit, which is not limited in the embodiments of the present disclosure.
[0143] For example, if the first bandwidth threshold is 50 Gbps, the compensation value of the first bandwidth threshold is 5 Gbps. Then, by adding the first bandwidth threshold to the corresponding compensation value, the target bandwidth threshold can be obtained as 55 Gbps. By subtracting the first bandwidth threshold from the corresponding compensation value, the target bandwidth threshold can be obtained as 45 Gbps. When implementing the present disclosure, whether to add or subtract the first bandwidth threshold from the corresponding compensation value can be determined according to actual needs, and the embodiments of the present disclosure are not limited to this.
[0144] In one example, the first bandwidth threshold can be reduced or enlarged by the ratio value corresponding to the first bandwidth threshold to obtain the target bandwidth threshold. Exemplarily, the ratio value corresponding to the first bandwidth threshold can be 5%, 10%, etc., which is not limited in the embodiments of the present disclosure. The ratio value corresponding to the first bandwidth threshold can be pre-configured or can change dynamically based on different tasks performed by the first hardware unit, which is not limited in the embodiments of the present disclosure.
[0145] For example, if the first bandwidth threshold is 50 Gbps, the ratio value of the first bandwidth threshold is 5%. Then, by enlarging the first bandwidth threshold by 5%, the target bandwidth threshold can be 52.5 Gbps. By reducing the first bandwidth threshold by 5%, the target bandwidth threshold can be 47.5 Gbps. When implementing the present disclosure, whether to enlarge or reduce the first bandwidth threshold can be determined according to actual needs, and the embodiments of the present disclosure are not limited to this.
[0146] In one embodiment, when the first bandwidth threshold is smaller than the second bandwidth threshold, the target bandwidth threshold may be determined based on the second bandwidth threshold.
[0147] For example, if the first bandwidth threshold is 20 Gbps and the second bandwidth threshold is 60 Gbps, the first bandwidth threshold is smaller than the second bandwidth threshold. Then, the target bandwidth threshold may be determined based on the second bandwidth threshold.
[0148] In one implementation, determining the target bandwidth threshold based on the second bandwidth threshold includes: determining the second bandwidth threshold as the target bandwidth threshold.
[0149] Exemplarily, if the second bandwidth threshold is 60 Gbps, then the target bandwidth threshold is 60 Gbps.
[0150] In another implementation, determining the target bandwidth threshold based on the second bandwidth threshold includes: adjusting the second bandwidth threshold to obtain the target bandwidth threshold.
[0151] In one example, the second bandwidth threshold and the corresponding compensation value may be added or subtracted to obtain the target bandwidth threshold. Exemplarily, the compensation value corresponding to the second bandwidth threshold may be 5 Gbps, 10 Gbps, etc., which is not limited in the embodiments of the present disclosure. The compensation value corresponding to the second bandwidth threshold may be pre-configured or may change dynamically based on different tasks performed by the first hardware unit, which is not limited in the embodiments of the present disclosure.
[0152] For example, if the second bandwidth threshold is 60 Gbps, the compensation value of the second bandwidth threshold is 5 Gbps. Then, by adding the second bandwidth threshold to the corresponding compensation value, the target bandwidth threshold can be obtained as 65 Gbps. By subtracting the second bandwidth threshold from the corresponding compensation value, the target bandwidth threshold can be obtained as 55 Gbps. When implementing the present disclosure, whether to add or subtract the second bandwidth threshold from the corresponding compensation value can be determined according to actual needs, and the embodiments of the present disclosure are not limited to this.
[0153] In one example, the second bandwidth threshold can be reduced or enlarged by the ratio value corresponding to the second bandwidth threshold to obtain the target bandwidth threshold. Exemplarily, the ratio value corresponding to the second bandwidth threshold can be 5%, 10%, etc., which is not limited in the embodiments of the present disclosure. The ratio value corresponding to the second bandwidth threshold can be pre-configured or can change dynamically based on the different tasks performed by the first hardware unit, which is not limited in the embodiments of the present disclosure.
[0154] For example, if the second bandwidth threshold is 60 Gbps, the ratio value of the second bandwidth threshold is 5%. Then, by enlarging the second bandwidth threshold by 5%, the target bandwidth threshold can be obtained as 63 Gbps. By reducing the second bandwidth threshold by 5%, the target bandwidth threshold can be obtained as 57 Gbps. When implementing the present disclosure, whether to enlarge or reduce the second bandwidth threshold can be determined according to actual needs, and the embodiments of the present disclosure do not limit this. In one embodiment, when the first bandwidth threshold is equal to the second bandwidth threshold, the target bandwidth threshold can be determined based on the first bandwidth threshold or the second bandwidth threshold.
[0155] For the method of determining the target bandwidth threshold based on the first bandwidth threshold or the second bandwidth threshold, please refer to the aforementioned embodiment, which will not be described in detail here.
[0156] It is understandable that, in order to meet the real-time performance requirements of the executed task, the first hardware unit hopes that the first bandwidth of the first hardware unit can be greater than or equal to the first bandwidth threshold. In order to meet the real-time performance requirements of the executed task, at least one second hardware unit hopes that the first bandwidth can be less than or equal to the second bandwidth threshold.
[0157] If the first bandwidth threshold is greater than the second bandwidth threshold, it means that the bus bandwidth required by the first hardware unit to meet the real-time performance requirements of the executed task is greater than the bus bandwidth that the second hardware unit wishes to allocate to the first hardware unit. Therefore, the target bandwidth threshold can be determined based on the first bandwidth threshold, so that the first bandwidth can be controlled based on the target bandwidth threshold to preferentially meet the real-time performance requirements of the task executed by the first hardware unit.
[0158] If the first bandwidth threshold is less than the second bandwidth threshold, it means that the bus bandwidth required by the first hardware unit to meet the real-time performance requirements of the executed task is less than the bus bandwidth that the second hardware unit wants to allocate to the first hardware unit. Therefore, the target bandwidth threshold can be determined based on the second bandwidth threshold, so that the first bandwidth can be controlled based on the target bandwidth threshold, and more bus bandwidth can be allocated to the first hardware unit, thereby improving the speed at which the first hardware unit executes tasks.
[0159] If the first bandwidth threshold is equal to the second bandwidth threshold, it means that the bus bandwidth required by the first hardware unit to meet the real-time performance requirements of the executed task is the same as the bus bandwidth that the second hardware unit hopes to allocate to the first hardware unit. Therefore, the target bandwidth threshold can be determined based on the first bandwidth threshold or the second bandwidth threshold. In this way, the first bandwidth can be controlled based on the target bandwidth threshold so that the bus bandwidth allocated to each hardware unit can meet the real-time performance requirements of the tasks executed by each hardware unit.
[0160] like Figure 7 As shown in the above Figure 3 Based on the illustrated embodiment, step 304 may include the following steps:
[0161] Step 3043: Determine a first weight value corresponding to the first bandwidth threshold and a second weight value corresponding to the second bandwidth threshold.
[0162] The first weight value and the second weight value are both greater than 0 and less than 1. The first weight value and the second weight value may be the same or different. The sum of the first weight value and the second weight value is preferably 1.
[0163] In one implementation, the first weight value corresponding to the first bandwidth threshold and the second weight value corresponding to the second bandwidth threshold may be preconfigured, for example, in a register of an integrated circuit.
[0164] In one implementation, the first bandwidth threshold and the second bandwidth threshold can be dynamically adjusted based on the priority of the task executed by the first hardware unit. For example, the higher the priority of the task executed by the first hardware unit, the greater the first weight value and the smaller the second weight value; the lower the priority of the task executed by the first hardware unit, the greater the second weight value and the smaller the first weight value.
[0165] Taking the example that the tasks performed by the first hardware unit include tasks in the intelligent driving scenario and tasks in the cockpit scenario, the priority of the tasks in the intelligent driving scenario is higher than the priority of the tasks in the cockpit scenario. Then, when the first hardware unit performs the tasks in the intelligent driving scenario, the first weight value can be 0.7 and the second weight value can be 0.3. When the first hardware unit performs the tasks in the cockpit scenario, the first weight value can be 0.5 and the second weight value can be 0.5.
[0166] Step 3044: Based on the first weight value and the second weight value, weighted sum of the first bandwidth threshold and the second bandwidth threshold is performed to obtain a target bandwidth threshold.
[0167] The first bandwidth threshold and the second bandwidth threshold are weighted and summed based on the first weight value and the second weight value to obtain the target bandwidth threshold, which can be implemented by the following formula:
[0168] Target bandwidth threshold=first bandwidth threshold×first weight value+second bandwidth threshold×second weight value.
[0169] In the disclosed embodiment, since the first bandwidth threshold matches the real-time performance requirement of the task executed by the first hardware unit, and the second bandwidth threshold matches the real-time performance requirement of the task executed by the second hardware unit, the first bandwidth threshold and the second bandwidth threshold are weighted and summed based on the first weight value and the second weight value to obtain the target bandwidth threshold, so that the target bandwidth threshold can take into account both the real-time performance requirement of the task executed by the first hardware unit and the real-time performance requirement of the task executed by the second hardware unit, making the bus bandwidth allocation more reasonable and improving the ability of the integrated circuit to execute multiple tasks in parallel.
[0170] In addition, in the embodiment of the present disclosure, the weight values of the first bandwidth threshold and the second bandwidth threshold can be dynamically adjusted based on the priority of the task executed by the first hardware unit, so that the first hardware unit can be allocated more bus bandwidth when executing high-priority tasks, thereby giving priority to meeting the real-time performance requirements of high-priority tasks.
[0171] like Figure 8 As shown in the above Figure 3 Based on the illustrated embodiment, step 305 may include the following steps:
[0172] Step 3051: Based on the target bandwidth threshold, determine the upper limit of the bandwidth for transmitting data through the bus by the first hardware unit.
[0173] In one implementation, determining the upper bandwidth limit value of data transmitted by the first hardware unit through the bus (i.e., determining the upper bandwidth limit value of the first bandwidth) based on the target bandwidth threshold value includes: determining the target bandwidth threshold value as the upper bandwidth limit value of the first bandwidth. Exemplarily, if the target bandwidth threshold value is 50 Gbps, then the upper bandwidth limit value of the first bandwidth is 50 Gbps.
[0174] In another implementation, based on the target bandwidth threshold, determining the bandwidth upper limit value of data transmitted by the first hardware unit through the bus (i.e., determining the bandwidth upper limit value of the first bandwidth) includes: adjusting the target bandwidth threshold to obtain the bandwidth upper limit value of the first bandwidth. Wherein, adjusting the target bandwidth threshold includes but is not limited to increasing or decreasing the target bandwidth threshold, for example, adding or subtracting the target bandwidth threshold from the corresponding compensation value, which is not limited in the embodiments of the present disclosure.
[0175] Step 3052: Control the bandwidth of data transmitted by the first hardware unit through the bus to be less than or equal to the bandwidth upper limit.
[0176] In some embodiments, the bandwidth control unit may use bandwidth throttling, outstanding request throttling, a combination of bandwidth throttling and outstanding request throttling, or other methods to limit the data transmitted by the first hardware unit through the bus, so that the bandwidth (i.e., the first bandwidth) of the data transmitted by the first hardware unit through the bus is less than or equal to the bandwidth upper limit value. The embodiment of the present disclosure does not specifically limit the method in which the bandwidth control unit controls the first bandwidth of the first hardware unit to be less than or equal to the bandwidth upper limit value.
[0177] In the disclosed embodiment, the target bandwidth threshold can match both the real-time performance requirements of the task executed by the first hardware unit and the real-time performance requirements of the task executed by at least one second hardware unit. Therefore, by determining the bandwidth upper limit based on the target bandwidth threshold and controlling the bandwidth of the first hardware unit transmitting data through the bus, the bus bandwidth allocated to each hardware unit can meet its respective real-time performance requirements.
[0178] Exemplary Devices
[0179] Fig. 9 The structure diagram of the bandwidth control device of the integrated circuit provided by an exemplary embodiment of the present disclosure is as follows. Fig. 9 As shown, the bandwidth control device 900 of the integrated circuit includes: a first determination module 901 , a second determination module 902 , a third determination module 903 , a fourth determination module 904 and a bandwidth control module 905 .
[0180] The first determination module 901 is used to determine a plurality of performance requirement parameters respectively corresponding to a plurality of hardware units in the integrated circuit.
[0181] The second determination module 902 is used to determine a first bandwidth threshold based on a first performance requirement parameter among the multiple performance requirement parameters; wherein the first performance requirement parameter corresponds to a first hardware unit among the multiple hardware units.
[0182] The third determination module 903 is used to determine the second bandwidth threshold based on at least one second performance requirement parameter among the multiple performance requirement parameters; wherein the at least one second performance requirement parameter corresponds to at least one second hardware unit among the multiple hardware units except the first hardware unit.
[0183] The fourth determination module 904 is configured to determine a target bandwidth threshold corresponding to the first hardware unit based on the first bandwidth threshold and the second bandwidth threshold.
[0184] The bandwidth control module 905 is used to control the bandwidth of data transmitted by the first hardware unit through the bus based on the target bandwidth threshold.
[0185] In some embodiments, Fig.10 As shown, the third determination module 903 includes a first determination submodule 9031 and a second determination submodule 9032. The first determination submodule 9031 is used to determine the number of second performance requirement parameters among the multiple performance requirement parameters; the second determination submodule 9032 is used to determine the second bandwidth threshold based on the number of second performance requirement parameters among the multiple performance requirement parameters and the bandwidth threshold corresponding to at least one second performance requirement parameter.
[0186] In some embodiments, the second determination submodule 9032 is used to determine the second bandwidth threshold based on the bandwidth threshold corresponding to the second performance requirement parameter in the multiple performance requirement parameters in response to the number of the second performance requirement parameters in the multiple performance requirement parameters being one.
[0187] In some embodiments, the second determination submodule 9032 is used to determine the size relationship of multiple second performance requirement parameters among the multiple performance requirement parameters in response to the number of second performance requirement parameters among the multiple performance requirement parameters being multiple; determine the target performance requirement parameter from the multiple second performance requirement parameters based on the size relationship of the multiple second performance requirement parameters; and determine the second bandwidth threshold based on the bandwidth threshold corresponding to the target performance requirement parameter.
[0188] In some embodiments, the second determination submodule 9032 is used to determine a maximum performance requirement parameter from multiple second performance requirement parameters based on the size relationship between the multiple second performance requirement parameters; and determine a target performance requirement parameter based on the maximum performance requirement parameter.
[0189] In some embodiments, the second determination module 902 is used to determine the size relationship between the first bandwidth threshold and the second bandwidth threshold; based on the size relationship between the first bandwidth threshold and the second bandwidth threshold, determine the target bandwidth threshold.
[0190] In some embodiments, the bandwidth control module 905 is used to determine the upper bandwidth limit of data transmitted by the first hardware unit through the bus based on the target bandwidth threshold; and limit the bandwidth of data transmitted by the first hardware unit through the bus to be less than or equal to the upper bandwidth limit.
[0191] The beneficial technical effects corresponding to the exemplary embodiment of the present device can be found in the corresponding beneficial technical effects of the above exemplary method section, which will not be repeated here.
[0192] Exemplary Electronic Devices
[0193] Fig.11A structural diagram of an electronic device provided in an embodiment of the present disclosure includes at least one processor 11 and a memory 12.
[0194] The processor 11 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 1100 to perform desired functions.
[0195] The memory 12 may include one or more computer program products, and the computer program products may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 11 may execute one or more computer program instructions to implement the bandwidth control method of the integrated circuit and / or other desired functions of the various embodiments of the present disclosure described above.
[0196] In one example, the electronic device 1100 may further include: an input device 13 and an output device 14, and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown).
[0197] The input device 13 may also include sensors, such as a camera, a laser radar, a millimeter-wave radar, an ultrasonic radar, a seat sensor, a microphone, a steering wheel, an accelerator pedal, a brake pedal, etc.
[0198] The output device 14 can output various information to the outside, and may include, for example, a display, a speaker, a communication network and a remote output device connected thereto, and the like.
[0199] Of course, to simplify, Fig.11 Only some of the components related to the present disclosure in the electronic device 1100 are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application scenarios, the electronic device 1100 may also include any other appropriate components.
[0200] Exemplary computer program products and computer-readable storage media
[0201] In addition to the above-mentioned methods and devices, embodiments of the present disclosure may also provide a computer program product, including computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the bandwidth control method of an integrated circuit of various embodiments of the present disclosure described in the above-mentioned "Exemplary Method" section.
[0202] The computer program product may be written in any combination of one or more programming languages to write program code for performing the operations of the disclosed embodiments, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0203] In addition, an embodiment of the present disclosure may also be a computer-readable storage medium having computer program instructions stored thereon. When the computer program instructions are executed by a processor, the processor executes the steps in the bandwidth control method of an integrated circuit of various embodiments of the present disclosure described in the above “Exemplary Method” section.
[0204] Computer readable storage media can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium is, for example, but not limited to, a system, device or device including electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0205] The basic principles of the present disclosure are described above in conjunction with specific embodiments. However, the advantages, strengths, effects, etc. mentioned in the present disclosure are only examples and not limitations, and cannot be considered as necessary for each embodiment of the present disclosure. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, rather than limitation, and the above details do not limit the present disclosure to being implemented by adopting the above specific details.
[0206] Those skilled in the art may make various changes and modifications to the present disclosure 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 present disclosure claims and their equivalents, the present disclosure is also intended to include these modifications and variations.
Claims
1. A bandwidth control method for an integrated circuit, comprising: Determining a plurality of performance requirement parameters corresponding to a plurality of hardware units in the integrated circuit; Determining a first bandwidth threshold based on a first performance requirement parameter among the multiple performance requirement parameters; wherein the first performance requirement parameter corresponds to a first hardware unit among the multiple hardware units; Determining a second bandwidth threshold based on at least one second performance requirement parameter among the multiple performance requirement parameters; wherein the at least one second performance requirement parameter corresponds to at least one second hardware unit among the multiple hardware units except the first hardware unit; Determine a target bandwidth threshold corresponding to the first hardware unit based on the first bandwidth threshold and the second bandwidth threshold; Based on the target bandwidth threshold, a bandwidth of data transmitted by the first hardware unit through a bus is controlled.
2. The method according to claim 1, wherein: The determining the second bandwidth threshold based on at least one second performance requirement parameter among the multiple performance requirement parameters comprises: Determining the number of the second performance requirement parameters among the plurality of performance requirement parameters; The second bandwidth threshold is determined based on the number of the second performance requirement parameters in the multiple performance requirement parameters and the bandwidth threshold corresponding to each of the at least one second performance requirement parameter.
3. The method according to claim 2, wherein: The determining the second bandwidth threshold based on the number of the second performance requirement parameters in the multiple performance requirement parameters includes: In response to the number of the second performance requirement parameter in the multiple performance requirement parameters being one, the second bandwidth threshold is determined based on the bandwidth threshold corresponding to the second performance requirement parameter in the multiple performance requirement parameters.
4. The method according to claim 2, wherein: The determining the second bandwidth threshold based on the number of the second performance requirement parameters in the multiple performance requirement parameters includes: In response to the number of the second performance requirement parameters in the plurality of performance requirement parameters being plural, determining a magnitude relationship between the plurality of second performance requirement parameters in the plurality of performance requirement parameters; Determining a target performance requirement parameter from the plurality of second performance requirement parameters based on a magnitude relationship among the plurality of second performance requirement parameters; The second bandwidth threshold is determined based on the bandwidth threshold corresponding to the target performance requirement parameter.
5. The method according to claim 4, wherein: The determining the target performance requirement parameter from the plurality of second performance requirement parameters based on the magnitude relationship of the plurality of second performance requirement parameters comprises: Based on the magnitude relationship among the plurality of second performance requirement parameters, determining a maximum performance requirement parameter from the plurality of second performance requirement parameters; Based on the maximum performance requirement parameter, the target performance requirement parameter is determined.
6. The method according to any one of claims 1 to 5, wherein: The determining, based on the first bandwidth threshold and the second bandwidth threshold, a target bandwidth threshold corresponding to the first hardware unit includes: Determine a magnitude relationship between the first bandwidth threshold and the second bandwidth threshold; The target bandwidth threshold is determined based on a magnitude relationship between the first bandwidth threshold and the second bandwidth threshold.
7. The method according to any one of claims 1 to 5, wherein: The controlling, based on the target bandwidth threshold, of the bandwidth of data transmitted by the first hardware unit through the bus includes: Based on the target bandwidth threshold, determining an upper limit value of a bandwidth for transmitting data by the first hardware unit through the bus; The bandwidth of data transmitted by the first hardware unit through the bus is controlled to be less than or equal to the bandwidth upper limit value.
8. An integrated circuit comprising: A plurality of hardware units, used to determine a plurality of performance requirement parameters respectively corresponding to the plurality of hardware units; A bandwidth control unit, configured to determine a first bandwidth threshold based on a first performance requirement parameter among the multiple performance requirement parameters; wherein the first performance requirement parameter corresponds to a first hardware unit among the multiple hardware units; The bandwidth control unit is further configured to determine a second bandwidth threshold based on at least one second performance requirement parameter among the multiple performance requirement parameters; wherein the at least one second performance requirement parameter corresponds to at least one second hardware unit among the multiple hardware units except the first hardware unit; The bandwidth control unit is further configured to determine a target bandwidth threshold corresponding to the first hardware unit based on the first bandwidth threshold and the second bandwidth threshold; The bandwidth control unit is further configured to control the bandwidth of data transmitted by the first hardware unit through a bus based on the target bandwidth threshold.
9. A computer-readable storage medium storing a computer program, wherein the computer program is used to execute the bandwidth control method of an integrated circuit according to any one of claims 1 to 7.
10. An electronic device, comprising: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the bandwidth control method of the integrated circuit described in any one of claims 1-7.