Bus bandwidth adaptive unit, method and chip
By designing a bus bandwidth adaptive unit in the on-chip system to monitor and adjust bus bandwidth usage parameters in real time, the problem of underutilized bus bandwidth is solved and more efficient resource utilization and power consumption reduction are achieved.
Patent Information
- Application Number
- CN202210164404.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-22
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2042-02-22
AI Technical Summary
The bandwidth allocation of the existing on-chip bus is fixed, which results in the bus bandwidth not being fully utilized in practical applications, resulting in resource waste and high power consumption.
Design a bus bandwidth adaptive unit, including a monitoring subunit, a comparison subunit and an output subunit, to monitor the bus bandwidth usage parameters of each device in real time, perform comparisons and adjustments, and optimize bandwidth allocation.
Through real-time monitoring and adjustment, the utilization of bus bandwidth is improved, resources are saved, bus power consumption is reduced, and the effectiveness of bus bandwidth allocation is improved.
Smart Images

Figure CN114546908B
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a bus bandwidth adaptation unit, method and chip. Background Art
[0002] With the development of SoC technology, various functional on-chip devices may be integrated into one chip, and the connection between these on-chip devices becomes the key to constructing SoC. The on-chip bus effectively solves the connection between devices on SoC in a bus manner, ensuring data communication between devices.
[0003] Take the AMBA bus as an example, it is a multi-bus system that can combine different types of buses, including AHB (Advanced High-performance Bus), ASB (Advanced System Bus), AXI (Advanced eXtensible Interface) and APB (Advanced Peripheral Bus). Through these buses, communication between on-chip devices with different functions can be effectively realized.
[0004] At present, the bandwidth allocated by the on-chip bus for communication between devices is fixed. However, in practical applications, the actual bandwidth used by different devices for on-chip communication varies, and the bandwidth is often not fully utilized. Therefore, improving the utilization rate of bus bandwidth and saving bus bandwidth resources have become urgent issues to be solved. Summary of the invention
[0005] In view of this, an embodiment of the present application provides a bus bandwidth adaptation solution to at least partially solve the above-mentioned problem.
[0006] According to a first aspect of an embodiment of the present application, a bus bandwidth adaptation unit is provided, comprising: a monitoring subunit, used to monitor each bus of a system on chip, and obtain bus bandwidth usage parameters of devices in the system on chip in at least one dimension; a comparison subunit, used to compare the bus bandwidth usage parameters in each dimension, and obtain a comparison result; and an output subunit, used to adjust the bandwidth usage of the bus bandwidth for the device based on the comparison result.
[0007] According to a second aspect of an embodiment of the present application, a bus bandwidth adaptation method is provided, comprising: monitoring each bus of a system on chip to obtain bus bandwidth usage parameters of devices in the system on chip in at least one dimension; for each dimension, comparing the bus bandwidth usage parameters in the dimension to obtain a comparison result; and based on the comparison result, adjusting the bandwidth usage of the bus bandwidth for the device.
[0008] According to a third aspect of an embodiment of the present application, a chip is provided, comprising at least: a processor, a bus, an on-chip device, and a bus bandwidth adaptation unit as described in the first aspect; wherein: the processor and the on-chip device are connected via the bus; and the bus bandwidth adaptation unit is tightly coupled to the bus.
[0009] According to the bus bandwidth adaptive solution provided by the embodiment of the present application, since the specific conditions of the devices in the system-on-chip when using the bus are different, they can be monitored in real time to obtain bus bandwidth usage parameters in one or more dimensions; then, in each dimension, the bus bandwidth usage parameters are compared to obtain comparison results; based on the comparison results, the specific conditions of the device's current use of the bus bandwidth can be determined, and then it can be determined whether it needs to be adjusted accordingly and how to adjust it. Through the bus bandwidth usage parameters and the comparison results obtained based on them, the busyness of the corresponding device accessing the on-chip memory can be obtained; and adjusting the bandwidth usage of the device according to the comparison results can realize the adaptive adjustment and allocation of the bus bandwidth, so that the bus bandwidth can be effectively and fully utilized, the effectiveness of the bus bandwidth allocation of the system-on-chip and the utilization of the bus bandwidth can be improved, the bus bandwidth resources can be saved, and the bus power consumption can be reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0011] Figure 1 A schematic diagram of an AMBA bus system applicable to an embodiment of the present application;
[0012] Figure 2A is a structural block diagram of a bus bandwidth adaptation unit according to Embodiment 1 of the present application;
[0013] Figure 2B for Figure 2A A specific structural example diagram of a bus bandwidth adaptation unit in the illustrated embodiment;
[0014] Figure 2C for Figure 2A A schematic diagram of the configuration of a bus bandwidth adaptation unit in the illustrated embodiment;
[0015] Figure 3A A flowchart of a bus bandwidth adaptation method according to Embodiment 2 of the present application;
[0016] Figure 3B for Figure 3A A flowchart of a specific example of bus bandwidth adaptation in the illustrated embodiment;
[0017] Figure 4 It is a schematic diagram of the structure of a chip according to the third embodiment of the present application. DETAILED DESCRIPTION
[0018] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the embodiments of the present application should fall within the scope of protection of the embodiments of the present application.
[0019] The specific implementation of the embodiment of the present application is further explained below in conjunction with the accompanying drawings of the embodiment of the present application.
[0020] Figure 1 A schematic diagram of an AMBA bus system applicable to an embodiment of the present application is shown.
[0021] AMBA (Advanced Microcontroller Bus Architecture) defines a communication standard for high-performance embedded microcontrollers. It can integrate RISC processors into other IP cores and peripherals. It is the "digital glue" that effectively connects IP cores. It is also an important component of the ARM multiplexing strategy and the interface for the ARM core to communicate with other components on the chip.
[0022] An exemplary AMBA bus system is as follows Figure 1As shown, it consists of a high-performance central bus (AMBA AHB or AMBA ASB or AMBA AXI), which can support external memory bandwidth, including processors, on-chip memory and other direct data access (DMA) devices, etc., which are respectively illustrated in the figure as: high-performance ARM processor, high-performance AI accelerator, DMA bus host, etc., and a high-bandwidth external memory interface supporting on-chip memory is shown. This bus provides a high-bandwidth interface for data transmission between the above devices. In addition, a bridge is also provided on the bus for connecting the low-bandwidth APB, and most of the system peripherals are connected to the APB, as shown in the figure: UART, Keypad, Timer and PIO.
[0023] Embodiment 1
[0024] Based on the bus system, the first embodiment of the present application provides a bus bandwidth adaptation unit, which is combined with Figure 2A-2C , the bus bandwidth adaptation unit is described.
[0025] Figure 2A The structure block diagram of a bus bandwidth adaptation unit according to the first embodiment of the present application is shown. The bus bandwidth adaptation unit includes: a monitoring subunit 102 , a comparing subunit 104 , and an output subunit 106 .
[0026] in:
[0027] The monitoring subunit 102 is used to monitor each bus of the system on chip and obtain the bus bandwidth usage parameters of the devices in the system on chip in at least one dimension. In the embodiment of the present application, the bus mainly refers to a high-bandwidth bus, such as AMBA AHB or AMBA ASB or AMBA AXI, etc.; the devices mainly include devices with bus bandwidth usage gaps, including but not limited to video codecs, decoders, GPUs, AI accelerators, DSPs, etc. The bus bandwidth usage of different devices can be obtained from different dimensions. For example, for video codecs, it can be mainly considered from the frame storage dimension, and for other devices or bandwidth occupancy of multiple devices including video codecs, it can also be obtained from dimensions such as QoS (Quality of Service) and back pressure of bus entry.
[0028] It should be noted that in the embodiments of the present application, unless otherwise specified, "plurality", "multiple" and other numbers related to "multiple" all mean two or more.
[0029] In a feasible manner, the at least one dimension includes: part or all of the bus inlet back pressure dimension, frame memory dimension, and QoS resolution dimension; correspondingly, the bus bandwidth usage parameter includes part or all of the bus inlet back pressure ratio, frame memory margin, and QoS resolution request quantity. Through these dimensions and parameters, the bus bandwidth usage can be effectively evaluated.
[0030] Generally speaking, the higher the bus inlet back pressure ratio, the higher the data transmission demand of the corresponding device, and the current bandwidth allocation may not be able to meet its demand; the frame memory margin can reflect whether the bandwidth of the corresponding device is redundant. The larger the frame memory margin, the more likely it is that there is redundancy, or the more redundancy there may be; QoS resolution requests will also occupy bandwidth. When the number of QoS resolution requests increases, they may occupy excessive resources and need to be differentiated and processed based on their urgency in the future.
[0031] The comparison subunit 104 is used to compare the bus bandwidth usage parameters in each dimension to obtain a comparison result.
[0032] Among them, the specific comparison method may be different for different dimensions. For example, for the bus inlet back pressure dimension, it is possible to compare whether the bus inlet back pressure ratio is higher than a certain high threshold (first ratio threshold) or lower than a certain low threshold (second ratio threshold), wherein the high threshold or low threshold can be flexibly set by those skilled in the art according to actual needs, and the embodiments of the present application are not limited to this. For example, the high threshold can be 20%, the low threshold can be 1%-0%, etc.
[0033] For another example, for the frame memory dimension, it is also possible to compare whether the frame memory margin is lower than a certain low threshold (first margin threshold) or higher than a certain high threshold (second margin threshold). Similarly, the high threshold or low threshold can be flexibly set by those skilled in the art according to actual needs, and the embodiment of the present application does not limit this. For example, the high threshold can be 2, the low threshold can be 1, etc.
[0034] For example, for the QoS resolution dimension, when the number of QoS resolution requests is less than or equal to a certain threshold, it can be processed in the usual way. However, if the number of QoS resolution requests is greater than the threshold, it is necessary to perform subsequent processing in the embodiment of the present application.
[0035] The output subunit 106 is used to adjust the bandwidth usage of the bus bandwidth for the device based on the comparison result.
[0036] After obtaining the comparison results of each dimension, corresponding adjustment processing can be performed based on the comparison results. For example, if the bus inlet back pressure ratio is higher than the first ratio threshold, more bandwidth resources can be allocated to the corresponding device. Conversely, if the bus inlet back pressure ratio is lower than or equal to the second ratio threshold, the corresponding device can be deprived of bandwidth resources. For another example, if the frame memory margin is higher than the second margin threshold, the corresponding device can be deprived of bandwidth resources; and if the frame memory margin is lower than the first margin threshold, more bandwidth resources can be allocated to the corresponding device. For another example, if the number of QoS resolution requests is less than or equal to a certain number threshold, it can be processed in a conventional manner, and if the number of QoS resolution requests is greater than the number threshold, the priority of these QoS resolution requests can be determined according to the urgency of these QoS resolution requests, and bandwidth resources are allocated to the QoS resolution requests according to the determined priority for processing. For example, bandwidth resources are allocated to a QoS resolution request with the highest priority for processing first, or bandwidth resources are allocated to a small number of QoS resolution requests with a priority of TOP N for processing first. Wherein, N is a positive integer, and the specific value of N can be appropriately set by those skilled in the art according to actual needs. For example, N can be 2 or 3.
[0037] In a feasible manner, the output subunit 106 can be used to perform at least one of the following bus bandwidth usage adjustments for the device based on the comparison result: adjustment of the device clock frequency, adjustment of the gear of the leading transmission (outstanding transmission of the AXI bus). Since the bus bandwidth represents the total amount of data that can be transmitted by the bus in a unit time, it can be determined by the product of the bus bit width and the operating frequency. Based on this, by adjusting the device clock frequency and / or the outstanding gear, the bandwidth usage adjustment of the device can be effectively achieved.
[0038] Based on the above bus bandwidth adaptive unit, since the specific conditions of the devices in the system on chip when using the bus are different, they can be monitored in real time to obtain bus bandwidth usage parameters in one or more dimensions; then, the bus bandwidth usage parameters are compared in each dimension to obtain a comparison result; based on the comparison result, the specific situation of the device currently using the bus bandwidth can be determined, and then it can be determined whether it needs to be adjusted accordingly and how to adjust it. Through the bus bandwidth usage parameters and the comparison results obtained based on them, the busyness of the corresponding device accessing the on-chip memory can be obtained; and adjusting the bandwidth usage of the device according to the comparison results can realize the adaptive adjustment and allocation of the bus bandwidth, so that the bus bandwidth can be effectively and fully utilized, the effectiveness of the bus bandwidth allocation of the system on chip and the utilization rate of the bus bandwidth can be improved, the bus bandwidth resources can be saved, and the bus power consumption can be reduced.
[0039] However, in order to make the adjustment more accurate, in a feasible manner, a policy configuration interface can also be set. That is, the bus bandwidth adaptation unit can also include: a policy configuration interface 108, which is used to obtain the bus bandwidth usage parameters of the monitoring subunit 102 and / or the comparison results of the comparison subunit 104; according to the bus bandwidth usage parameters and / or the comparison results, determine the bandwidth usage adjustment strategy of the bus bandwidth. Based on this, the output subunit 106 can be used to adjust the bandwidth usage of the bus bandwidth for the device according to the bandwidth usage adjustment strategy. In this way, the corresponding adjustment strategy can be pre-set in the policy configuration interface 108, and after obtaining the bus bandwidth usage parameters and / or the comparison results, it is matched with the pre-set adjustment strategy to determine the matching adjustment strategy. Among them, the pre-set adjustment strategy may include but is not limited to the adjustment method used by the aforementioned output subunit 106 to adjust the bus bandwidth usage based on the comparison results. Therefore, on the one hand, the policy configuration interface 108 performs policy matching, which reduces the processing burden of the output sub-unit 106 and simplifies its specific technical implementation; on the other hand, the policy configuration interface 108 can pre-set more required adjustment strategies as needed, and can more conveniently update the set adjustment strategies, thereby making the bus bandwidth adaptation unit more flexible and improving the bandwidth adjustment efficiency.
[0040] Optionally, the policy configuration interface 108 can determine the bandwidth usage adjustment policy of the bus bandwidth through a preset reinforcement learning machine model according to the bus bandwidth usage parameters and / or the comparison results. Among them, the reinforcement machine learning model can be any machine learning model that takes the bus bandwidth usage parameters and / or the comparison results as input and takes the adjustment policy as output. The embodiment of the present application does not limit the specific implementation of the reinforcement machine learning model and its implementation process. Exemplarily, the reinforcement machine learning model can be a policy evaluation model. Further optionally, the policy evaluation model can be a KB-Tree-based policy evaluation model to achieve more accurate policy selection.
[0041] An exemplary bus bandwidth adaptation unit is as follows: Figure 2B As shown in the figure, the monitoring subunit 102 monitors multiple buses, each of which is used by at least one on-chip device. The comparison subunit 104 compares the product line bandwidth usage parameters of the on-chip devices in various dimensions monitored by the monitoring subunit 102 and generates a comparison result. Figure 2B In the process, the monitoring result of the monitoring subunit 102 and the comparison result of the comparison subunit 104 are transmitted to the policy configuration interface 108, and the policy configuration interface 108 determines the corresponding bandwidth usage adjustment policy, and then sends the bandwidth usage adjustment policy to the output subunit 106, and the bandwidth usage of each device is adjusted by the output subunit 106. Figure 2BThe figure shows the adjustment of the clock frequency of each device and the adjustment of the outstanding gear based on the AXI bus.
[0042] Among them, when making specific adjustments, the adjustment step size can be set, and the specific step size setting can be flexibly set by those skilled in the art according to actual needs, and the embodiments of the present application are not limited to this. For example, the adjustment step size of the clock frequency can be 1-10MHz, and the adjustment step size of outstanding can be one gear at a time (outstanding capability N is adjusted up or down by one level, that is, N+1 or N-1). Of course, the above is only an exemplary description, and in specific use, it can also be set to other step size values.
[0043] When setting the bus bandwidth adaptation unit, Figure 2C As shown, it can be coupled with the bus of the system on chip. Figure 2C In the example, the bus is connected to the on-chip devices, including but not limited to: memory controller, CPU, GPU, VDEC (video decoder), Disp (display unit). In this example, the bus monitors the data transmission of each device on the bus through the bus bandwidth adaptation unit coupled to it, and performs the above-mentioned processing and adjustment based on the monitoring results. In a more preferred solution, the bus bandwidth adaptation unit can be tightly coupled to the bus of the system on chip to better serve the bus.
[0044] In the following, the bandwidth usage adjustment process of the bus bandwidth adaptation unit is described by taking the on-chip device as a multimedia processing device (such as a video decoder, etc.) as an example.
[0045] When the on-chip device is a multimedia processing device, its bus bandwidth usage parameter includes at least the frame memory margin. In this case, the frame memory margin means the difference between the frame memory completed by the video decoder (the number of video frames in the memory) and the frame memory of the display unit.
[0046] Based on this, the monitoring subunit 102 will monitor the bus bandwidth usage parameters of the multimedia processing device when using the bus to process the video frame, including the completion of the frame storage of the video decoder and the frame storage of the display unit, and based on this, the frame storage operation of the multimedia processing device is obtained; the comparison subunit 104 will compare the frame storage margin with the preset threshold (such as the first margin threshold and the second margin threshold mentioned above) to obtain a comparison result; the output subunit 106 will adjust the bandwidth usage of the bus bandwidth of the multimedia processing device according to the comparison result. For example, if the comparison result indicates that the frame storage margin is less than the first margin threshold, the data transmission capacity of the multimedia processing device is increased, such as increasing the clock frequency of the multimedia processing device, and / or, in the case of using the AXI bus, the outstanding transmission gear is increased. If the comparison result indicates that the frame storage margin is greater than the second margin threshold, the data transmission capacity of the multimedia processing device is reduced, and / or, in the case of using the AXI bus, the outstanding transmission gear is lowered.
[0047] Since multimedia processing devices such as video decoders have their own corresponding data transmission gaps, their bandwidth usage can be adjusted based on this. The bus resources when they are idle can be adjusted to other on-chip devices for use, so as to fully utilize the bus resources of the on-chip system and improve the overall data transmission and processing efficiency of the on-chip system.
[0048] Embodiment 2
[0049] Reference Figure 3A , shows a step flow chart of a bus bandwidth adaptation method according to Embodiment 2 of the present application.
[0050] The bus bandwidth adaptation method of this embodiment can be implemented by the aforementioned bus bandwidth adaptation unit, and the method includes the following steps:
[0051] Step S202: monitor each bus of the system on chip to obtain a bus bandwidth usage parameter of a device in the system on chip in at least one dimension.
[0052] In one feasible manner, the at least one dimension includes: part or all of the bus inlet back pressure dimension, the frame memory dimension, and the QoS resolution dimension. Correspondingly, the bus bandwidth usage parameter includes part or all of the bus inlet back pressure ratio, the frame memory margin, and the QoS resolution request quantity.
[0053] When the device is a multimedia processing device, the frame memory margin is the difference between the frame memory completed by the video decoder and the frame memory of the display unit.
[0054] Step S204: for each dimension, compare the bus bandwidth usage parameters in the dimension to obtain a comparison result.
[0055] For example, for the bus inlet back pressure dimension, it is possible to compare whether the bus inlet back pressure ratio is higher than a certain high threshold (first ratio threshold) or lower than a certain low threshold (second ratio threshold), wherein the high threshold or the low threshold can be flexibly set by those skilled in the art according to actual needs, and the embodiment of the present application does not limit this. For example, the high threshold can be 20%, the low threshold can be 1%-0%, etc.
[0056] For another example, for the frame memory dimension, it is also possible to compare whether the frame memory margin is higher than a certain high threshold (second margin threshold) or lower than a certain low threshold (first margin threshold). Similarly, the high threshold or low threshold can be flexibly set by those skilled in the art according to actual needs, and the embodiment of the present application does not limit this. For example, the high threshold can be 2, the low threshold can be 1, etc.
[0057] For example, for the QoS resolution dimension, when the number of QoS resolution requests is less than or equal to a certain threshold, it can be processed in the usual way. However, if the number of QoS resolution requests is greater than the threshold, it is necessary to perform subsequent processing in the embodiment of the present application.
[0058] Step S206: Based on the comparison result, adjust the bandwidth usage of the bus bandwidth for the device.
[0059] The bandwidth usage adjustment includes at least one of the following: adjustment of device clock frequency, adjustment of advance transmission gear.
[0060] In one feasible manner, in order to make the adjustment more accurate, this step can be implemented as follows: inputting the bus bandwidth usage parameter and / or the comparison result into the reinforcement learning machine model through the policy configuration interface to obtain the bandwidth usage adjustment strategy output by the reinforcement learning machine model; and adjusting the bandwidth usage of the bus bandwidth for the device according to the bandwidth usage adjustment strategy.
[0061] The process is described below by taking the device as a multimedia processing device as an example. In this example, the multimedia processing device is specifically exemplified as a video decoder VDEC, but those skilled in the art should understand that other devices such as GPU, AI accelerator, DSP, etc. may also be applicable to this example.
[0062] like Figure 3B As shown, the bandwidth adjustment process for VDEC in this example specifically includes:
[0063] Process A: Monitor the frame memory information of VDEC to obtain the frame memory margin.
[0064] For example, the monitoring subunit 102 may be used to monitor and obtain the difference between the VDEC completed frame memory and the display unit frame memory, that is, VDEC frame memory-Disp frame memory.
[0065] Process B: Determine whether the frame memory margin is less than the first margin threshold; if so, execute process C; if not, execute process D.
[0066] In this example, the first margin threshold is set to 1, and the figure illustrates judging that VDEC frame storage - Disp frame storage < 1.
[0067] Process C: Improve the data transmission capability of VDEC. Return to process A.
[0068] For example, increase the VDEC clock frequency, and / or adjust the outstanding gear higher.
[0069] Process D: Determine whether the frame memory margin is greater than the second margin threshold; if so, execute process E; if not, execute process F.
[0070] In this example, the second margin threshold is set to 2, and the figure shows that VDEC frame memory - Disp frame memory > 2. In this case, it indicates that the video decoding frame memory is ahead, and the data transmission capacity of VDEC can be reduced.
[0071] Process E: Reduce the data transmission capacity of VDEC. Return to process A.
[0072] For example, reduce the VDEC clock frequency, and / or lower the outstanding gear.
[0073] Process F: Do not adjust the data transmission capacity of VDEC and return to process A.
[0074] Through this embodiment, the specific situation of the devices in the system on chip when using the bus is monitored in real time to obtain bus bandwidth usage parameters in one or more dimensions; then, in each dimension, the bus bandwidth usage parameters are compared to obtain comparison results; based on the comparison results, the specific situation of the device currently using the bus bandwidth can be determined, and then it can be determined whether it needs to be adjusted accordingly and how to adjust it. Through the bus bandwidth usage parameters and the comparison results obtained based on them, the busyness of the corresponding device accessing the on-chip memory can be obtained; and adjusting the bandwidth usage of the device according to the comparison results can realize the adaptive adjustment and allocation of the bus bandwidth, so that the bus bandwidth can be effectively and fully utilized, the effectiveness of the bus bandwidth allocation of the system on chip and the utilization rate of the bus bandwidth can be improved, the bus bandwidth resources can be saved, and the bus power consumption can be reduced.
[0075] Embodiment 3
[0076] Reference Figure 4 , shows a schematic diagram of the structure of a chip according to Embodiment 3 of the present application.
[0077] The chip in this embodiment at least includes: a processor, a bus, on-chip devices, and the bus bandwidth adaptation unit described in the above-mentioned embodiment 1; wherein: the processor and the on-chip devices are connected through the bus; and the bus bandwidth adaptation unit is tightly coupled to the bus.
[0078] In a specific example, if Figure 4 As shown, the chip is based on the AMBA bus structure, which includes Figure 1 In addition to the high-performance central bus, processor, on-chip memory interface (high-bandwidth external memory interface, for accessing on-chip memory), high-performance AI accelerator, DMA, bridge and APB shown in the figure, it also includes the bus bandwidth adaptation unit described in the aforementioned embodiment one.
[0079] As can be seen from the figure, the bus bandwidth adaptation unit is tightly coupled to the AMBA bus.
[0080] Therefore, in the chip of this embodiment, during the process of data transmission between each on-chip device through the bus, the bus bandwidth usage can be monitored in real time, and the bandwidth usage of the device can be adjusted in time, so that the bus bandwidth can be effectively and fully utilized, the effectiveness of the bus bandwidth allocation of the on-chip system and the utilization rate of the bus bandwidth can be improved, bus bandwidth resources can be saved, and bus power consumption can be reduced.
[0081] It should be pointed out that, according to the needs of implementation, the various components / steps described in the embodiments of the present application can be split into more components / steps, or two or more components / steps or partial operations of components / steps can be combined into new components / steps to achieve the purpose of the embodiments of the present application.
[0082] Those of ordinary skill in the art will appreciate that the units and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present application.
[0083] The above implementation methods are only used to illustrate the embodiments of the present application, and are not limitations on the embodiments of the present application. Ordinary technicians in the relevant technical field can make various changes and modifications without departing from the spirit and scope of the embodiments of the present application. Therefore, all equivalent technical solutions also belong to the scope of the embodiments of the present application. The scope of patent protection of the embodiments of the present application should be limited by the claims.
Claims
1. A bus bandwidth adaptation unit, comprising: A monitoring subunit, configured to monitor each bus of the system on chip and obtain a bus bandwidth usage parameter of a device in the system on chip in at least one dimension; The at least one dimension includes: a frame memory dimension; the bus bandwidth usage parameter includes: a frame memory margin; the device is a multimedia processing device; the frame memory margin is the difference between the frame memory completed by the multimedia processing device and the frame memory of the display unit; A comparison subunit, configured to compare the frame memory margin with a first margin threshold or a second margin threshold to obtain a comparison result; wherein the first margin threshold is smaller than the second margin threshold; An output subunit is used to increase the data transmission capacity of the multimedia processing device if it is determined that the frame memory margin is less than the first margin threshold; reduce the data transmission capacity of the multimedia processing device if it is determined that the frame memory margin is greater than the second margin threshold; and do not adjust the data transmission of the multimedia processing device if it is determined that the frame memory margin is greater than or equal to the first margin threshold and less than or equal to the second margin threshold.
2. The bus bandwidth adaptation unit according to claim 1, wherein: The output subunit is used to perform at least one of the following bus bandwidth usage adjustments for the device based on the comparison result: device clock frequency adjustment, advance transmission gear adjustment.
3. The bus bandwidth adaptation unit according to claim 1, wherein: The bus bandwidth adaptation unit also includes: A policy configuration interface, used to obtain the bus bandwidth usage parameters of the monitoring subunit and / or the comparison result of the comparison subunit; determine the bandwidth usage adjustment policy of the bus bandwidth according to the bus bandwidth usage parameters and / or the comparison result; The output subunit is used to adjust the bandwidth usage of the bus bandwidth for the device according to the bandwidth usage adjustment strategy.
4. The bus bandwidth adaptation unit according to claim 3, wherein: The policy configuration interface determines a bandwidth usage adjustment policy for the bus bandwidth through a preset reinforcement learning machine model according to the bus bandwidth usage parameter and / or the comparison result.
5. The bus bandwidth adaptation unit according to claim 1, wherein: The bus bandwidth adaptation unit is tightly coupled to the bus; The bus is an AMBA bus.
6. A bus bandwidth adaptive method, comprising: Monitoring each bus of the system on chip to obtain a bus bandwidth usage parameter of a device in the system on chip in at least one dimension; The at least one dimension includes: a frame memory dimension; the bus bandwidth usage parameter includes: a frame memory margin; the device is a multimedia processing device; the frame memory margin is the difference between the frame memory completed by the multimedia processing device and the frame memory of the display unit; For the multimedia processing device, compare the frame memory margin with a first margin threshold or a second margin threshold to obtain a comparison result; wherein the first margin threshold is less than the second margin threshold; If it is determined that the frame memory margin is less than the first margin threshold, increasing the data transmission capacity of the multimedia processing device; If it is determined that the frame memory margin is greater than the second margin threshold, reducing the data transmission capacity of the multimedia processing device; If it is determined that the frame memory margin is greater than or equal to the first margin threshold and less than or equal to the second margin threshold, the data transmission of the multimedia processing device is not adjusted.
7. The method according to claim 6, wherein: Based on the comparison result, adjusting the bandwidth usage of the bus bandwidth for the device includes: Inputting the bus bandwidth usage parameter and / or the comparison result into a reinforcement learning machine model through a policy configuration interface to obtain a bandwidth usage adjustment policy output by the reinforcement learning machine model; According to the bandwidth usage adjustment strategy, bandwidth usage of the bus bandwidth is adjusted for the device.
8. A chip, comprising at least: A processor, a bus, an on-chip device, and a bus bandwidth adaptation unit as claimed in any one of claims 1 to 5; in: The processor and the on-chip device are connected via the bus; the bus bandwidth adaptation unit is tightly coupled to the bus.
