Bandwidth control method and system, electronic device, vehicle, and storage medium
Patent Information
- Application Number
- JP2024205519
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-08-16
- Filing Date
- 2024-11-26
- Publication Date
- 2025-03-26
- Estimated Expiration
- 2044-11-26
Smart Images

Figure 2025041612000001_ABST
Abstract
Description
[Technical field]
[0001] The present disclosure relates to the technical field of integrated circuits, and in particular to bandwidth control methods and systems, electronic devices, vehicles, and storage media. [Background technology]
[0002] Some integrated circuits, e.g., a system on chip (SoC), may run multiple operating systems (OS), and these operating systems may share bandwidth resources corresponding to the integrated circuit, e.g., share memory bandwidth.
[0003] Currently, when multiple operating systems run on an integrated circuit, there exists a problem that the allocation of bandwidth resources corresponding to the integrated circuit is not reasonable, which affects the business performance of each operating system. Summary of the Invention [Problem to be solved by the invention]
[0004] The embodiments of the present disclosure provide a bandwidth control method, device, integrated circuit, electronic device, and vehicle, which can dynamically allocate the resources of an integrated circuit to each operating system when multiple operating systems run on the integrated circuit, thereby improving the business performance and resource utilization of each operating system. [Means for solving the problem]
[0005] In a first aspect, an embodiment of the present disclosure provides a bandwidth control method, the method including the steps of: acquiring a usage status of a cache queue, the cache queue being for caching accesses to a second hardware unit by a plurality of operating systems operated by a first hardware unit; determining a first throttling parameter of the first operating system based on the usage status of the cache queue; and controlling a bandwidth of accesses of the first operating system to the second hardware unit based on the first throttling parameter.
[0006] In a second aspect, an embodiment of the present disclosure provides a bandwidth control device, the device including a first throttling module communicatively connected to a first hardware unit on which a plurality of operating systems are running, the first throttling module corresponding to the first operating system, and configured to obtain a usage state of a cache queue for caching accesses to a second hardware unit by the plurality of operating systems run by the first hardware unit, determine a first throttling parameter for the first operating system based on the usage state of the cache queue, and control a bandwidth of the first operating system's access to the second hardware unit based on the first throttling parameter.
[0007] In a third aspect, an embodiment of the present disclosure provides an integrated circuit including: a first hardware unit on which a plurality of operating systems are running; and a plurality of throttling modules communicatively connected to the first hardware unit and arranged in one-to-one correspondence with the plurality of operating systems, at least one of the throttling modules configured to realize a function of the first throttling module of the second aspect, e.g., to perform steps of the bandwidth control method provided in the first aspect.
[0008] In a fourth aspect, an embodiment of the present disclosure provides an electronic device including the integrated circuit provided in the third aspect.
[0009] In a fifth aspect, an embodiment of the present disclosure provides a vehicle including the integrated circuit provided in the third aspect or the electronic device provided in the fourth aspect. Effect of the Invention
[0010] The technical solution provided in the embodiments of the present disclosure can control the access bandwidth of each operating system to the second hardware unit based on the usage status of the cache queue, thereby realizing dynamic allocation of bandwidth resources to the second hardware unit, which can not only improve the business performance of each operating system, but also improve the utilization rate of bandwidth resources and reduce the waste of bandwidth resources. [Brief description of the drawings]
[0011] [Figure 1] FIG. 1 is a block diagram of a cockpit-driving integrated system according to an exemplary embodiment of the present disclosure; [Diagram 2] FIG. 1 is a structural schematic diagram of a bandwidth control system provided in an exemplary embodiment of the present disclosure; [Diagram 3] 1 is a flowchart of a bandwidth control method provided in an exemplary embodiment of the present disclosure. [Figure 4] FIG. 1 is a schematic diagram of dynamically controlling access bandwidth provided in an exemplary embodiment of the present disclosure. [Diagram 5] 1 is a flowchart of step S120 of a bandwidth control method provided in an exemplary embodiment of the present disclosure. [Figure 6] FIG. 1 is a schematic diagram of determining a target bandwidth threshold provided in an exemplary embodiment of the present disclosure. [Figure 7] FIG. 1 is a structural schematic diagram of a bandwidth control device provided in an exemplary embodiment of the present disclosure; [Figure 8]FIG. 1 is a structural schematic diagram of an integrated circuit provided in an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0012] Hereinafter, exemplary embodiments of the present disclosure will be described in detail with reference to the drawings. It is clear that the described embodiments are only some of the embodiments of the present disclosure, and are not all of the embodiments of the present disclosure, and it should be understood that the present disclosure is not limited to the exemplary embodiments described herein.
[0013] It should be noted that the scope of the present disclosure is not limited to the relative arrangements, formulas and values of the components and steps described in these examples, unless specifically stated otherwise.
[0014] First, some technical terms related to the embodiments of the present disclosure will be interpreted and explained.
[0015] Bandwidth is the amount of data transmitted per unit of time. Bandwidth can be measured in bits per second (bps), kilobits per second (kbps), megabits per second (Mbps), gigabits per second (Gbps), etc.
[0016] Memory is a device for temporarily storing data and instructions in a computer system to facilitate rapid access and execution by the processor. Memory may include random access memory (RAM), such as dynamic random access memory (DRAM) and static random access memory (SRAM).
[0017] Memory bandwidth, also called the bandwidth resource of a memory, is the amount of data that a memory can transmit within a unit of time. The unit of memory bandwidth may be bps, kbps, Mbps, Gbps, etc.
[0018] An SoC is an integrated circuit that integrates multiple modules / units of a computer system on a single chip. Here, the modules / units that can be integrated into an SoC include a central processing unit (CPU), a graphics processing unit (GPU), an SRAM, an I / O interface, a digital signal processing (DSP), a deep learning processing unit (DPU), a neural processing unit (NPU) and / or a tensor processing unit (TPU), an image signal processing (ISP), a memory controller, etc.
[0019] <Application Summary> An operating system may be running on an integrated circuit. For example, the integrated circuit may include a processor, and the operating system may run on the processor. The processor may establish communication with a memory (e.g., DRAM, SRAM, etc.). Thus, during operation of the operating system, the operating system may load instructions into the memory, and the processor may read instructions and data from the memory and perform various operations, such as arithmetic operations, logical operations, and data transfer, in response to the instructions, and write results of the instruction execution into the memory.
[0020] Multiple operating systems can run on a high performance integrated circuit, such as a high performance SoC.
[0021] FIG. 1 is a block diagram of the structure of a cockpit-driving integrated system provided in an exemplary embodiment of the present disclosure.
[0022] In the embodiment of the present disclosure, the cockpit-driving integrated system includes a hardware part and a software part. Here, the hardware part of the cockpit-driving integrated system includes an integrated circuit, and the software part includes a cockpit operating system (abbreviated as cockpit system) and an intelligent driving operating system (abbreviated as intelligent driving system) simultaneously operating in the integrated circuit. That is, the cockpit-driving integrated system is a system that simultaneously operates a cockpit system and an intelligent driving system in an integrated circuit. Here, the intelligent driving system is mainly responsible for the automatic driving and safety of the vehicle, including environmental sensing, route planning, decision-making and control, etc. The cockpit system is mainly responsible for the driving and riding experience and human-computer interaction inside the vehicle, including information entertainment, meter display, media playback, and environmental control, etc. Compared with the independent cockpit system and intelligent driving system, the cockpit-driving integrated system has a higher degree of integration and intelligence, which is advantageous for improving the driving safety, comfort, and driving and riding experience of the vehicle.
[0023] Here, the cockpit-driving integrated system can be applied to autonomous vehicles, such as cars (intelligent connected vehicles), ships, trains, subways, airplanes, etc., and various robots, such as service robots, transport robots, automated guided vehicles (AGVs), unmanned ground vehicles (UGVs), etc., and various construction machines, etc.
[0024] As shown in FIG. 1, in one embodiment, the cockpit-driving integrated system may include a SoC 100. In one example, the SoC 100 may include one or more processors, such as one or more CPUs, one or more GPUs, one or more ISPs, one or more DSPs, one or more DPUs, one or more NPUs, and / or one or more TPUs. These processors may be used to provide computing resources to multiple operating systems to support each operating system in implementing its functionality.
[0025] In one embodiment, the cockpit-driving integrated system may further include a memory device 200. The memory device 200 may store instructions and data, and the processor may read and execute instructions in the memory device 200 and write the execution result to the memory device 200. In one example, the memory device 200 may include a memory, such as a DRAM and / or an SRAM. Here, the memory device 200 may be integrated into the SoC 100, such as an SRAM, and may be part of the SoC 100, or the memory device 200 may be an independent device outside the SoC 100, such as a DRAM, and the embodiment of the present disclosure is not specifically limited thereto. In one example, the SoC may further include a memory controller 110 that may manage and coordinate access to the memory (e.g., SRAM and DRAM) by each processor.
[0026] In one embodiment, multiple operating systems, for example OS1 to OSN, may be running on the SoC 100. Exemplarily, the multiple operating systems may include at least a cockpit operating system and an intelligent drive operating system.
[0027] During operation, multiple operating systems can call the processor to access memory, e.g., read instructions in the memory or write the results of executing instructions to the memory, i.e., multiple operating systems share memory bandwidth, e.g., share DRAM bandwidth and / or SRAM bandwidth.
[0028] In one implementation, memory bandwidth can be pre-allocated to each operating system. Take three operating systems, for example OS1, OS2, and OS3, running on an SoC, and the DRAM bandwidth is 100 Gbps, and assign 50 Gbps of DRAM bandwidth to OS1, 30 Gbps of DRAM bandwidth to OS2, and 20 Gbps of DRAM bandwidth to OS3. However, since different operating systems have different functions and perform different tasks, the DRAM bandwidth required by different operating systems is also different. In addition, since the tasks performed by each operating system change, the DRAM bandwidth required by each operating system also changes dynamically.
[0029] Take for example that the multiple operating systems include an intelligent drive system and a cockpit system.
[0030] For example, when the vehicle is in an intelligent driving state, the intelligent driving system needs to execute an intelligent driving task, in which case a large amount of instructions and data related to the intelligent driving task is loaded into the DRAM by the intelligent driving system, read and executed by the processor, and the processor also writes a large amount of instruction execution results into the DRAM. Therefore, the DRAM bandwidth required by the intelligent driving system is large. In a parking scene, the intelligent driving system does not need to execute an intelligent driving task, so the instructions and data written into the DRAM by the intelligent driving system are small, and the DRAM bandwidth required by the intelligent driving system is small.
[0031] For example, when the vehicle plays media, the cockpit system needs to perform the task of media playback, in which case the instructions and media data are loaded into the DRAM by the cockpit system, read and executed by the processor, and the processor writes the instruction execution result into the DRAM. For example, the processor can decode the read media data and write the decoded media data into the DRAM. Therefore, the DRAM bandwidth required by the cockpit system is large. In a standby scene, the cockpit system does not need to perform tasks such as media playback, navigation, games, etc., so the instructions and data written into the DRAM by the cockpit system are few, and the DRAM bandwidth required by the cockpit system is small.
[0032] Because the memory bandwidth required by each operating system changes dynamically, the method of pre-allocating memory bandwidth cannot realize rational utilization of memory bandwidth, and further leads to memory bandwidth waste, and the memory bandwidth allocated to the operating system cannot meet the business requirements of the operating system.
[0033] Take for example that the multiple operating systems include an intelligent drive system and a cockpit system.
[0034] For example, assume that the DRAM bandwidth allocated to the intelligent drive system is 50 Gbps and the DRAM bandwidth allocated to the cockpit system is 30 Gbps. When the vehicle is in a parked state, the intelligent drive system does not need to perform intelligent drive tasks, so it can enter an idle state, and the DRAM bandwidth of, for example, 40 Gbps becomes idle. In this case, even if the cockpit system is running a game application that requires a DRAM bandwidth of 40 Gbps, the cockpit system can only use the allocated DRAM bandwidth of 30 Gbps and cannot use the DRAM bandwidth in the idle state of the intelligent drive system. That is, the DRAM bandwidth allocated to one operating system cannot be used by the business in another operating system, which not only fails to improve the business performance of the other operating system, but also leads to a waste of DRAM bandwidth.
[0035] For example, assume that the DRAM bandwidth allocated to OS1 is 50 Gbps and the current operation of OS1 requires a DRAM bandwidth of 60 Gbps. The DRAM bandwidth that OS1 has cannot meet the requirements of its own operation, which will affect the operation performance of OS1.
[0036] As can be seen, when multiple operating systems are running on an integrated circuit, the bandwidth resources corresponding to the integrated circuit, such as memory bandwidth, have the problem of being allocated unreasonably, which affects the business performance of each operating system.
[0037] The embodiments of the present disclosure provide a bandwidth control method, device, integrated circuit, electronic device, and vehicle, which can make the allocation of bandwidth resources corresponding to an integrated circuit more rational when multiple operating systems are running on the integrated circuit, improve the operating performance of the operating systems, and reduce resource waste.
[0038] Exemplary Systems FIG. 2 is a structural schematic diagram of a bandwidth control system provided in an exemplary embodiment of the present disclosure.
[0039] As shown in FIG. 2, the bandwidth control system may include a first hardware unit 10, a second hardware unit 20 communicatively connected to the first hardware unit 10, a bandwidth sharing module 30, and a number of throttling modules 40.
[0040] The bandwidth sharing module 30 is installed between the first hardware unit 10 and the second hardware unit 20, and the bandwidth sharing module 30 includes a cache queue for caching access instructions to the second hardware unit 20 by multiple operating systems, and the bandwidth sharing module 30 is used to generate a status value indicating the usage status of the cache queue.
[0041] A plurality of throttling modules 40 are installed in one-to-one correspondence with a plurality of operating systems, and each throttling module 40 is installed between the first hardware unit 10 and the bandwidth sharing module 30, and each throttling module 40 is used to determine a target bandwidth threshold corresponding to each operating system operated by the first hardware unit 10 based on a state value and a plurality of throttling parameters preset for each operating system, and is also used to control the bandwidth of access to the second hardware unit 20 by each operating system operated by the first hardware unit 10 based on the target bandwidth threshold corresponding to each operating system.
[0042] The first hardware unit 10 may include multiple functional modules 11 in an integrated circuit (e.g., SoC). Each functional module 11 is used to realize one or more functions of the integrated circuit (e.g., SoC). For example, the functional module 11 may be a CPU, a GPU, an NPU, a DPU, a TPU, an ISP, a DSP, etc. Also, the functional module 11 may be a core of a CPU, a streaming processor of a GPU, a computing unit of an NPU, etc. That is, each core of a CPU may be a functional module 11, each streaming processor of a GPU may be a functional module 11, and each computing unit of an NPU may be a functional module 11.
[0043] A plurality of operating systems, such as an intelligent drive system, a cockpit system and / or other operating systems, may be running on the first hardware unit 10. Here, a plurality of operating systems are running on the first hardware unit 10. Different operating systems can run in different functional modules 11, in other words, different functional modules 11 can be managed by different operating systems.
[0044] For example, the first hardware unit 10 includes three operating systems, OS1 to OS3, and the CPU includes eight cores, core 1 to core 8. OS1 operates on core 1 and core 2 (in other words, core 1 and core 2 are managed by OS1), OS2 operates on core 3 to core 6 (in other words, core 3 to core 6 are managed by OS2), and OS3 operates on core 7 and core 8 (in other words, core 7 and core 8 are managed by OS3). Similarly, one operating system can manage one or more streaming processors of the GPU, and one operating system can manage one or more computing units of the NPU.
[0045] When an ISP includes multiple ISP units, one operating system can manage at least one ISP unit, and different ISP units can be managed by different operating systems. Similarly, when a DSP includes multiple DSP units, one operating system can manage at least one DSP unit, and different DSP units can be managed by different operating systems.
[0046] In one implementation, each functional module 11 of the first hardware unit 10 can communicate with, eg, access, another hardware unit (eg, the second hardware 20).
[0047] Exemplarily, the first hardware unit 10 and the second hardware unit 20 can communicate through a bus, where the bus may specifically be an AXI (advanced extensible interface) bus, and the AXI bus may include five channels, for example as follows: A read address channel (AR) for transmitting addresses for read accesses. A read data channel (R) for transmitting data for read access A write address channel (AW) for transmitting addresses for write accesses A write data channel (W) for transmitting data for write access A write response channel (B) for transmitting responses to write accesses
[0048] Of course, other protocol buses, such as advanced high-performance bus (AHB), inter-integrated circuit (I2C) bus, HyperTransport bus, etc., may also be used, and the embodiments of the present disclosure are not limited thereto.
[0049] The second hardware unit 20 may include a memory or other hardware unit that communicates with the first hardware unit 10. Exemplarily, the second hardware unit 20 may be a DRAM and / or an SRAM. Accordingly, the bus may be a DRAM bus for a functional module 11 (e.g., a CPU) in the SoC to access the DRAM, or an SRAM bus for accessing the SRAM. Accordingly, the memory bandwidth is the bandwidth of the DRAM bus (abbreviated as DRAM bandwidth) and / or the bandwidth of the SRAM bus (abbreviated as SRAM bandwidth).
[0050] In the embodiment of the present disclosure, the first hardware unit 10 and the second hardware unit 20 may be located on different chips, for example, the first hardware unit 10 may be located on an SoC and the second hardware unit 20 may be a DRAM installed independently of the SoC, or the first hardware unit 10 and the second hardware unit 20 may be located on the same chip, for example, the first hardware unit 10 may be located on an SoC and the second hardware unit 20 may be an SRAM integrated in the SoC.
[0051] In addition, when the first hardware unit 10 includes a plurality of operating systems, each operating system calls the functional module 11 managed by it to realize the corresponding function. In response, each functional module 11 can access the second hardware unit 20 (e.g., memory) to read instructions and data, or write the result of executing instructions, in order to realize its function. Therefore, the access of each functional module 11 to the second hardware unit 20 can be described as each operating system accessing the second hardware unit 20, or each operating system calling the functional module 11 managed by it to access the second hardware unit 20. For example, the access of core 1 and core 2 of the CPU to the DRAM can be described as OS1 accessing the DRAM, and the access of the DSP managed by OS2 to the DRAM can be described as OS2 accessing the DRAM.
[0052] In order to easily explain the communication connection relationship between each module / unit in the bandwidth control system, the functional module 11 of the first hardware unit 10 accesses the second hardware unit 20 as an example, the transmission direction of this access is called the downstream direction, and the reverse direction of the transmission of this access is called the upstream direction.
[0053] In one implementation, the bandwidth control system may further include a bandwidth sharing module 30. The bandwidth sharing module 30 is located downstream of each functional module 11 and upstream of the second hardware unit 20. The bandwidth sharing module 30 is communicatively connected to each functional module 11 and the second hardware unit 20. In this way, the access of each functional module 11 can first reach the bandwidth sharing module 30 and then be transmitted to the second hardware unit 20.
[0054] In one implementation, the bandwidth sharing module 30 includes a cache queue that can be used to cache the accessed instructions and / or data. When the access of each functional module 11 arrives at the bandwidth sharing module 30, it can be first put into the cache queue and cached. Then, the bandwidth sharing module 30 can schedule the access in the cache queue according to a preset scheduling policy and transmit the access to the second hardware unit 20, and the preset scheduling policy can include, for example, first-in-first-out FIFO scheduling, priority scheduling, round robin scheduling, etc. Here, the cache queue can include a read queue and a write queue, where the instructions and / or data of the read access of each functional module 11 can be put into the read queue, and the instructions and / or data of the write access of each functional module 11 can be put into the write queue. Of course, the read queue and the write queue can also be merged into one queue, and the instructions and / or data of the read access and the write access of each functional module 11 are both put into this queue. Here, the cache queue can be a parallel queue or a serial queue, and the embodiment of the present disclosure is not limited thereto.
[0055] In one implementation, the bandwidth sharing module 30 may include, or the functionality of, the bandwidth sharing module 30 may be implemented by, a memory controller, for example. Here, the memory controller may be, for example, a DDR Controller (DDRC) or another type of memory controller. Accordingly, the cache queue may be a read queue (read_queue) or a write queue (write_queue) in the memory controller.
[0056] As can be seen, the bandwidth sharing module 30 can manage and schedule the access of each functional module 11, thereby enabling each functional module 11 to efficiently utilize memory bandwidth and also avoiding conflicts between each module when accessing the second hardware unit 20, thereby improving system stability.
[0057] It is possible to classify each functional module 11 based on the correspondence between each functional module 11 and each operating system; for example, it can be understood that modules that run OS1 and modules that are managed by OS1 are classified as OS1 functional modules 11, modules that run OS2 and modules that are managed by OS2 are classified as OS2 functional modules 11, and modules that run OSN and modules that are managed by OSN are classified as OSN functional modules 11.
[0058] In the embodiment of the present disclosure, the bandwidth control system may further include a plurality of throttling modules 40, for example, throttling modules 40-1 to throttling modules 40-N, which are installed in one-to-one correspondence with a plurality of operating systems. Here, the throttling module 40 may be installed in a communication link between the functional module 11 of the corresponding operating system and the bandwidth sharing module 30, that is, the throttling module 40 is installed downstream of the functional module 11, and the bandwidth sharing module 30 is installed downstream of the throttling module 40. For example, the throttling module 40-1 may be installed in a communication link between the functional module 11 of OS1 and the bandwidth sharing module 30, the throttling module 40-2 may be installed in a communication link between the functional module 11 of OS2 and the bandwidth sharing module 30, and so on. That is, the throttling module 40 and the functional module 11 corresponding to the same operating system communicate with each other.
[0059] In this way, when an operating system accesses the second hardware unit 20, the access (e.g., command, data, etc.) first passes through the throttling module 40 corresponding to the operating system, and then is transmitted to the second hardware unit 20 through the bandwidth sharing module 30. Here, when the access passes through the throttling module 40, the throttling module 40 can throttle the access. In this way, the transmission bandwidth downstream of the access can be controlled. That is, the bandwidth of the access of the operating system to the second hardware unit 20 is controlled.
[0060] In one implementation, each throttling module 40 can control the bandwidth of the corresponding operating system's access to the second hardware unit 20 based on the usage state of the cache queue. For example, when the number of cached accesses in the cache queue is high, i.e., the cache queue is congested, the throttling module 40 can control the corresponding operating system to access the second hardware unit 20 at a low bandwidth, i.e., allocate a low memory bandwidth to the operating system. When the number of cached accesses in the cache queue is low, i.e., the cache queue is in an idle state, the throttling module 40 can allow the corresponding operating system to access the second hardware unit 20 at a higher bandwidth, i.e., allocate a higher memory bandwidth to the operating system.
[0061] As can be seen from this, in the bandwidth scheduling system provided in the embodiment of the present disclosure, a throttling module 40 is installed corresponding to each operating system, and the throttling module 40 dynamically controls the access bandwidth of each operating system to the second hardware unit 20 according to the usage status of the cache queue, so as to make the allocation of bandwidth resources of the second hardware unit 20 more rational, which can not only improve the business performance of each operating system, but also improve the utilization rate of bandwidth resources and reduce the waste of bandwidth resources.
[0062] Exemplary Methods FIG. 3 is a flowchart of a bandwidth control method provided in an exemplary embodiment of the present disclosure.
[0063] Hereinafter, each step of the method will be exemplarily described with reference to Fig. 3. Hereinafter, each step of the method can be performed by any throttling module 40 in the bandwidth control system. For ease of description, hereinafter, any operating system among the multiple operating systems running on the first hardware unit 10 will be referred to as a first operating system, and the throttling module 40 corresponding to the first operating system will be referred to as a first throttling module.
[0064] In one embodiment, the method may include steps S110 to S130.
[0065] In step S110, the usage status of the cache queue is acquired.
[0066] Here, the cache queue may be any queue in the bandwidth sharing module 30. The cache queue is used to cache accesses to the second hardware unit 20 by multiple operating systems, for example, caching instructions and / or data of the accesses. The usage state of the cache queue may include any parameter value or indication information that can characterize the idle / congested degree of the cache queue.
[0067] In one implementation, the usage status of the cache queue may be indicated by the status value of the cache queue, or may be indicated by other information, such as a status level, a flag bit, etc., which are not specifically limited herein.
[0068] Exemplarily, when the bandwidth sharing module 30 includes a read queue and a write queue, the cache queue may include a read queue and / or a write queue, where the read queue is used to cache read access instructions of the multiple operating systems to the second hardware unit 20, and the write queue is used to cache write access instructions of the multiple operating systems to the second hardware unit 20. Accordingly, the status value of the cache queue may include a status value of the read queue and / or a status value of the write queue.
[0069] Illustratively, if a read queue and a write queue are merged into a read-write queue, the state value of the cache queue may include the state value of the read-write queue.
[0070] Here, the cache queue status value may characterize how idle or busy the cache queue is, which in turn is related to the access bandwidth to the second hardware unit 20 by the respective operating system.
[0071] For example, when the operations in each operating system are busy, the accesses of each operating system to the second hardware unit 20 increase. Therefore, a large number of accesses enter the cache queue, and the number of accesses entering the cache queue is greater than the number of accesses leaving the cache queue, so that the number of accesses cached in the cache queue increases and the idle degree of the cache queue decreases. Accordingly, the bandwidth of the accesses of each operating system to the second hardware unit 20 also increases, and the idle bandwidth resources of the second hardware unit 20 decrease.
[0072] Similarly, when the operations of each operating system are idle, the accesses of each operating system to the second hardware unit 20 are reduced. Therefore, only a small amount of accesses enter the cache queue, and the number of accesses entering the cache queue is less than the number of accesses leaving the cache queue, so that the number of accesses cached in the cache queue is reduced, and the idleness of the cache queue is increased. At the same time, the bandwidth of the accesses of each operating system to the second hardware unit 20 is reduced, and the idle bandwidth resources of the second hardware unit 20 are increased.
[0073] In one implementation, the cache queue may include multiple entries, each of which can cache one access instruction, where in a read queue, the entries may be read entries, each of which can cache one read access instruction, and in a write queue, the entries may be write entries, each of which can cache one write access instruction and can also cache data to be written. Accordingly, the status value of the cache queue may include the number of available entries (also referred to as the number of idle entries) or the number of unavailable entries (also referred to as the number of non-idle entries) of the cache queue.
[0074] Illustratively, a cache queue may contain 10 entries, and if instructions are cached in 8 entries, then the number of available entries in the cache queue is 2 and the number of unavailable entries is 8; if instructions are cached in 2 entries, then the number of available entries in the cache queue is 8 and the number of unavailable entries is 2.
[0075] It can be seen that if the cache queue state value includes the number of available entries in the cache queue, a larger state value indicates more idle bandwidth resources in the second hardware unit 20 and a smaller state value indicates less idle bandwidth resources in the second hardware unit 20. If the cache queue state value includes the number of unavailable entries in the cache queue, a larger state value indicates less idle bandwidth resources in the second hardware unit 20 and a smaller state value indicates more idle bandwidth resources in the second hardware unit 20.
[0076] In one implementation, the bandwidth sharing module 30 can send a status value of the cache queue to the first throttling module, for example, sending the number of available or unavailable entries of the cache queue to the first throttling module, where if the bandwidth sharing module 30 includes a read queue and a write queue, the bandwidth sharing module 30 can send a status value of the read queue and / or a status value of the write queue to the first throttling module.
[0077] In one example, the bandwidth sharing module 30 can monitor a state value of the cache queue, such as the number of available or unavailable entries in the cache queue. When the state value of the cache queue changes, the bandwidth sharing module 30 sends the changed state value to the first throttling module, such as when the number of available or unavailable entries in the cache queue changes, the bandwidth sharing module 30 sends the changed number of available or unavailable entries to the first throttling module.
[0078] In one example, the bandwidth sharing module 30 can periodically transmit the state value of the cache queue to the first throttling module. For example, a timer can be disposed in the bandwidth sharing module 30, and the timer can periodically time out at a preset time, and the bandwidth sharing module 30 can transmit the state value of the cache queue to the first throttling module in response to the timeout signal of the timer.
[0079] In one example, both accesses entering and leaving the cache queue change the number of available entries and the number of unavailable entries in the cache queue, so the bandwidth sharing module 30 can monitor accesses entering and leaving the cache queue, and when accesses entering and leaving the cache queue are monitored, the bandwidth sharing module 30 can obtain the latest number of available entries and the latest number of unavailable entries in the cache queue and send the obtained number of available entries and the latest number of unavailable entries to the first throttling module.
[0080] In step S120, a first throttling parameter of the first operating system is determined based on the usage state of the cache queue.
[0081] Here, the first throttling parameter throttles the first operating system's access to the second hardware unit 20 to control the bandwidth of the first operating system's access to the second hardware unit 20.
[0082] In one implementation, a first throttling parameter of the first operating system can be determined based on the state value of the cache queue, where the first throttling parameter can include a target bandwidth threshold of the first operating system.
[0083] In one implementation, a plurality of throttling parameters can be preset for the first operating system, and each throttling parameter can include a preset bandwidth threshold. A correspondence relationship between a plurality of state values and a plurality of throttling parameters of the first operating system can also be preset, and after obtaining the state value of the cache queue, the throttling parameter corresponding to the state value of the cache queue can be determined as the first throttling parameter based on the correspondence relationship.
[0084] Furthermore, in a scenario with multiple operating systems, the operations of different operating systems may be different, and the requirements for the bandwidth of the second hardware unit 20 may also be different. Therefore, for the same state value, the throttling parameters of each operating system may be the same or different. Specifically, they can be reasonably set based on the business requirements of each operating system, and are not specifically limited here.
[0085] For example, a correspondence between the number of available entries (or the number of unavailable entries) in the cache queue and the bandwidth threshold of each operating system can be preset, and the correspondence can be stored in a register corresponding to the first throttling module, where each throttling module 40 can correspond to one register, or multiple throttling modules 40 can share a register, and is not limited thereto.
[0086] Illustratively, if the cache queue state value includes the number of available entries in the cache queue, the bandwidth threshold for each operating system may increase as the number of available entries in the cache queue increases. Similarly, if the cache queue state value includes the number of unavailable entries in the cache queue, the bandwidth threshold for each operating system may decrease as the number of unavailable entries in the cache queue increases. That is, the more bandwidth resources that are idle in the second hardware unit 20, the higher the bandwidth threshold for each operating system, and the fewer bandwidth resources that are idle in the second hardware unit 20, the lower the bandwidth threshold for each operating system.
[0087] Here, increasing the bandwidth threshold of each operating system as the number of available entries in the cache queue increases may include continuously increasing the bandwidth threshold of each operating system as the number of available entries in the cache queue increases, or intermittently increasing the bandwidth threshold of each operating system as the number of available entries in the cache queue increases. Decreasing the bandwidth threshold of each operating system as the number of unavailable entries in the cache queue increases may include continuously decreasing the bandwidth threshold of each operating system as the number of unavailable entries in the cache queue increases, or intermittently decreasing the bandwidth threshold of each operating system as the number of unavailable entries in the cache queue increases.
[0088] In other words, the correspondence between the number of available entries in the cache queue and the bandwidth threshold of each operating system can be flexibly set according to the actual throttling requirements, and the embodiments of the present disclosure are not limited thereto.
[0089] For example, take the bandwidth resource of the second hardware unit 20 as 100 Gbps and the number of entries in the cache queue as 100, and the corresponding relationship between the number of available entries in the cache queue and the bandwidth threshold of each operating system is as shown in Table 1. Note that the values disclosed in Table 1 are merely illustrative and do not specifically limit the embodiments of the present disclosure.
[0090] [Table 1]
[0091] In this way, the first throttling module can determine a target bandwidth threshold corresponding to the obtained number of available entries from a plurality of bandwidth thresholds corresponding to the first operating system based on the number of available entries sent from the bandwidth sharing module 30.
[0092] Exemplarily, when the number of available entries in the cache queue is 10, throttling module 40-1 may determine that the target bandwidth threshold for OS1 is 50 Gbps, throttling module 40-2 may determine that the target bandwidth threshold for OS2 is 30 Gbps, and throttling module 40-3 may determine that the target bandwidth threshold for OS3 is 20 Gbps. When the number of available entries in the cache queue is 50, throttling module 40-1 may determine that the target bandwidth threshold for OS1 is 70 Gbps, throttling module 40-2 may determine that the target bandwidth threshold for OS2 is 50 Gbps, and throttling module 40-3 may determine that the target bandwidth threshold for OS3 is 30 Gbps.
[0093] In one implementation, when a cache queue includes a read queue and a write queue, throttling parameters can be set for read accesses and write accesses of the first operating system, respectively, where the throttling parameters for read accesses and write accesses corresponding to the same state value may be the same or different.
[0094] For example, as shown in Table 2, a correspondence between the number of available entries in the read queue and the read bandwidth threshold of each operating system can be preset.
[0095] [Table 2]
[0096] For example, as shown in Table 3, a correspondence between the number of available entries in the write queue and the write bandwidth threshold of each operating system can be preset.
[0097] [Table 3]
[0098] It should be noted that the values disclosed in Tables 2 and 3 are merely illustrative and do not limit the embodiments of the present invention.
[0099] In this way, it is possible to perform throttling on read and write accesses of the first operating system.
[0100] In step S130, the bandwidth of the first operating system's access to the second hardware unit is controlled based on the first throttling parameter.
[0101] In one implementation, when access by the first operating system to the second hardware unit 20 goes through the first throttling module, the first throttling module can throttle the access based on a target bandwidth threshold of the first operating system so that the bandwidth of the first operating system's access to the second hardware unit 20 is equal to or less than the target bandwidth threshold.
[0102] Exemplarily, referring to Table 1, when the number of available entries in the cache queue is 10, the target bandwidth threshold of OS1 is 50 Gbps, so the throttling module 40-1 can throttle the bandwidth of OS1's access to the second hardware unit 20 to 50 Gbps or less. In comparison, when the number of available entries in the cache queue is 50, the target bandwidth threshold of OS1 is 70 Gbps, so the throttling module 40-1 can throttle the bandwidth of OS1's access to the second hardware unit 20 to 70 Gbps or less.
[0103] In addition, during the operation of each operating system, the amount of access by each operating system to the second hardware unit 20 changes dynamically, and accordingly, the number of available entries in the cache queue changes dynamically, so that the target bandwidth threshold of the first operating system also changes dynamically. In other words, the first throttling module dynamically controls the bandwidth of the access of the first operating system to the second hardware unit 20.
[0104] FIG. 4 is a schematic diagram of dynamically controlling access bandwidth provided in an exemplary embodiment of the present disclosure.
[0105] For example, when the number of available entries in the cache queue is 50, the target bandwidth threshold of OS1 is 70 Gbps, and the target bandwidth threshold of OS2 is 50 Gbps. Therefore, when OS1 accesses the second hardware, the throttling module 40-1 can throttle the bandwidth of OS1's access to the second hardware 20 to 70 Gbps. At this time, when OS2 also accesses the second hardware unit 20, the access of OS2 also enters the cache queue, so the number of accesses entering the cache queue increases and the number of available entries in the cache queue decreases, for example, the number of available entries decreases to 10. At this time, the bandwidth sharing module 30 can send the new number of available entries, 10, to each throttling module 40. After receiving the new number of available entries, 10, the throttling module 40-1 determines to reduce the target bandwidth threshold of OS1 to 50 Gbps, and therefore reduces the bandwidth of OS1's access to the second hardware 20 to 50 Gbps. Similarly, after receiving the new number of available entries, 10, the throttling module 40-2 determines to reduce the target bandwidth threshold for OS2 to 30 Gbps, and therefore reduces the bandwidth of OS2's access to the second hardware 20 to 30 Gbps.
[0106] As can be seen, when the number of available entries in the cache queue is small, i.e., the second hardware unit 20 has few idle bandwidth resources, the first throttling module can control the first operating system to access the second hardware unit 20 at a low bandwidth in order to meet the bandwidth resource demands of other operating systems. When the number of available entries in the cache queue is large, i.e., the second hardware unit 20 has many idle bandwidth resources, the first throttling module can control the first operating system to access the second hardware unit 20 at a high bandwidth in order to fully utilize the bandwidth resources of the second hardware unit 20 and improve the operating performance of the first operating system.
[0107] Also, when the first throttling parameters include the number of available entries in the write queue and the number of available entries in the read queue, the first throttling module throttles the read accesses and the write accesses of the first operating system, respectively, that is, the bandwidth of the write accesses of the first operating system to the second hardware unit 20 can be controlled, and the bandwidth of the read accesses of the first operating system to the second hardware unit 20 can also be controlled.
[0108] As can be seen from the above technical solutions, the method provided in the embodiments of the present disclosure dynamically controls the access bandwidth of each operating system to the second hardware unit 20 based on the usage status of the cache queue, so as to make the allocation of bandwidth resources of the second hardware unit 20 more rational, and not only can improve the business performance of each operating system, but also can improve the utilization rate of bandwidth resources and reduce the waste of bandwidth resources.
[0109] In one implementation, the state value of the cache queue may include multiple state value intervals, where the multiple state value intervals are separated by multiple state thresholds, in some examples, the state thresholds may be referred to as watermarks and the state value intervals may be referred to as watermark intervals.
[0110] The number of state thresholds may be m, where m is an integer equal to or greater than 1. Then, the m state thresholds may form m+1 state value intervals in ascending or descending order of numerical values, which will be described in detail below with reference to examples.
[0111] Exemplarily, the state threshold may be an available entry number threshold. If the cache queue contains 100 entries, the value range of the available entry number threshold should be 0 to 100. For example, m available entry number thresholds W1 to W m are W1 90, W2 80, …, W m-1 is 20, and W m is 10. The m available entry number thresholds may form a total of m+1 state value intervals, e.g., a number of available entries greater than or equal to 90 corresponds to state value interval 1, a number of available entries less than or equal to 90 and greater than or equal to 80 corresponds to state value interval 2, a number of available entries less than or equal to 20 and greater than or equal to 10 corresponds to state value interval m, and a number of available entries less than or equal to 10 corresponds to state value interval m+1.
[0112] For example, the state threshold can be stored in a register, and each throttling module 40 can read the state threshold from the register. Here, a register can be provided in each throttling module 40, and a state threshold can be set in each throttling module 40, that is, the state threshold set in each throttling module 40 can be the same or different. Of course, each throttling module 40 can also share a register, and each throttling module 40 can use the same state threshold. In addition, the state threshold can be flexibly set by changing the contents of the register to meet different bandwidth control requirements.
[0113] Here, different state value intervals may correspond to different throttling parameters. For the same state value interval, the throttling parameters set for different operating systems may be the same or different. Table 4 shows an exemplary relationship between each bandwidth threshold and each state value interval for each operating system, taking the bandwidth resource of the second hardware unit 20 as an example of 100 Gbps, where W represents the number of available entries in the cache queue.
[0114] [Table 4]
[0115] It should be noted that the values disclosed in Table 4 are merely illustrative and do not specifically limit the embodiments of the present disclosure.
[0116] For example, the relationship between the bandwidth threshold and the state value interval of each operating system can be stored in a register. Here, the register can be provided in each throttling module 40, or each throttling module 40 can share the register, and is not specifically limited here. In addition, in order to meet different bandwidth control requirements, the relationship between the bandwidth threshold and the state value interval of each operating system can be flexibly set by changing the contents of the register.
[0117] FIG. 5 is a flowchart of step S120 of the bandwidth control method provided in an exemplary embodiment of the present disclosure.
[0118] As shown in FIG. 5, in one implementation, step S120 may include step S121 and step S122.
[0119] In step S121, a first interval corresponding to the state value of the cache queue is determined from a plurality of state value intervals.
[0120] Exemplarily, the state value of the cache queue can be numerically compared to at least one state threshold, and a state value interval in which the state value is located is determined based on the numerical relationship between the state value and the at least one state threshold, and this state value interval is designated as a first interval.
[0121] In step S122, the throttling parameter corresponding to the first interval is determined as the first throttling parameter.
[0122] Exemplarily, the first throttling module may determine a throttling threshold of a first operating system corresponding to the first interval as a target bandwidth threshold of the first operating system. For example, the throttling module 40-1 may determine a bandwidth threshold of OS1 corresponding to the first interval as a target bandwidth threshold of OS1, and the throttling module 40-2 may determine a bandwidth threshold of OS2 corresponding to the first interval as a target bandwidth threshold of OS2.
[0123] FIG. 6 is a schematic diagram of determining a target bandwidth threshold provided in an exemplary embodiment of the present disclosure.
[0124] For example, as shown in FIG. 6, referring to Table 4, m available entry number thresholds are W1=90, W2=80, ..., W m-1 is 20, and W m Take for example that W is 10. If the number of available entries W of the cache queue is 91, it can be determined by comparison that W is greater than or equal to W1, so the first interval is state value interval 1, and thus the target bandwidth threshold of OS1 is 90 Gbps, the target bandwidth threshold of OS2 is 70 Gbps, and the target bandwidth threshold of OS3 is 60 Gbps. If the number of available entries W of the cache queue is 85, it can be determined by comparison that W1 is greater than W and W is greater than or equal to W2, so the first interval is state value interval 2, and thus the target bandwidth threshold of OS1 is 85 Gbps, the target bandwidth threshold of OS2 is 65 Gbps, and the target bandwidth threshold of OS3 is 55 Gbps. If the number of available entries W of the cache queue is 8, it can be determined by comparison that W is greater than W1, so the first interval is state value interval 3, and thus the target bandwidth threshold of OS1 is 85 Gbps, the target bandwidth threshold of OS2 is 65 Gbps, and the target bandwidth threshold of OS3 is 55 Gbps. m Since it can be determined that the first interval is state value interval m+1, the target bandwidth threshold of OS1 is 50 Gbps, the target bandwidth threshold of OS2 is 30 Gbps, and the target bandwidth threshold of OS3 is 20 Gbps.
[0125] In one implementation, the first throttling module may further determine a target bandwidth threshold for the first operating system by sequentially comparing the number of available entries in the cache queue with each available entry threshold in order of highest or lowest available entry threshold.
[0126] Referring to Table 4, take the throttling module 40-1 as an example to determine the target bandwidth threshold of OS1. If the number of available entries W is 95, the throttling module 40-1 first compares the number of available entries W with the available entry number threshold W1, and since W is greater than or equal to W1, the throttling module 40-1 can determine the target bandwidth threshold of OS1 to be 90Gbps without performing subsequent comparison. If the number of available entries W is 85, since W is less than W1, the throttling module 40-1 first compares the number of available entries W with the available entry number threshold W2, and since W is greater than or equal to W2, the throttling module 40-1 can determine the target bandwidth threshold of OS1 to be 85Gbps without performing subsequent comparison.
[0127] As can be seen, this implementation can reduce the number of comparisons, improve the speed at which the first throttling module determines the target bandwidth threshold, and reduce the delay in controlling the bandwidth by the first throttling module.
[0128] In the embodiment of the present disclosure, the first throttling module may adopt a bandwidth throttling scheme to control the bandwidth of the first operating system's access to the second hardware unit 20, and may also adopt an outstanding request throttling scheme to control the bandwidth of the first operating system's access to the second hardware unit 20. In addition, the first throttling module may adopt a scheme that combines bandwidth throttling and outstanding request throttling to control the bandwidth of the first operating system's access to the second hardware unit 20. Of course, the first throttling module may also adopt other restriction schemes to control the bandwidth of the first operating system's access to the second hardware unit 20, and the embodiment of the present disclosure is not limited thereto.
[0129] In another embodiment of the present disclosure, the bandwidth control method provided by the present disclosure includes: determining a status value indicative of a usage status of a cache queue for caching an access instruction to the second hardware unit 20 by each of the operating systems operated by the first hardware unit 10; determining a target bandwidth threshold for each operating system run by the first hardware unit 10 based on the state value and a plurality of throttling parameters preset for each operating system; and controlling the bandwidth of access to the second hardware unit 20 by each of the operating systems run by the first hardware unit 10 based on a target bandwidth threshold value respectively corresponding to each operating system.
[0130] In one implementation form, the step of controlling the bandwidth of access by each operating system run by the first hardware unit 10 to the second hardware unit 20 based on a target bandwidth threshold corresponding to each operating system includes a step of controlling the bandwidth of access by each operating system run by the first hardware unit 10 to the second hardware unit 20 based on a target bandwidth threshold corresponding to each operating system so that the bandwidth is less than or equal to the target bandwidth threshold corresponding to each operating system.
[0131] In one implementation, determining a state value indicating a usage status of the cache queue includes determining a number of available entries of a plurality of entries in the cache queue for caching access instructions, and determining the state value based on the number of available entries of the plurality of entries.
[0132] In one implementation, the step of determining a target bandwidth threshold corresponding to each operating system operated by the first hardware unit 10 based on the state value and a plurality of throttling parameters preset for each operating system includes the steps of determining a first throttling parameter corresponding to each operating system from a plurality of throttling parameters preset for each operating system based on the state value, and determining a target bandwidth threshold corresponding to each operating system based on the first throttling parameter corresponding to each operating system.
[0133] In one implementation, the step of determining a first throttling parameter corresponding to each operating system from a plurality of throttling parameters preset for each operating system based on the state value includes a step of determining a first interval corresponding to the state value from a plurality of preset state value intervals, and a step of determining a first throttling parameter of the first interval corresponding to each operating system from a plurality of throttling parameters preset for each operating system.
[0134] Since the implementation of any of the steps in this embodiment has been described above, a description thereof will be omitted here.
[0135] Exemplary Devices The bandwidth control method provided in the embodiment of the present disclosure has been introduced above. An integrated circuit (e.g., an SoC) or a first hardware unit in the SoC may include corresponding hardware and software for implementing the hardware functions to implement each function of the bandwidth control method.
[0136] Those skilled in the art can easily recognize that the embodiments of the present disclosure can be realized in the form of hardware or in the form of a combination of software driving hardware by referring to the steps of the bandwidth control method described in each embodiment of the present disclosure. Whether a function is implemented in hardware or software driving hardware is determined by the specific application and design constraints of the technical solution. Those skilled in the art can realize the described functions using different methods for each specific application, but such realization should not be considered beyond the scope of the present disclosure.
[0137] FIG. 7 is a structural schematic diagram of a bandwidth control device provided in an exemplary embodiment of the present disclosure.
[0138] As shown in FIG. 7, in one embodiment, the bandwidth control device 300 includes a first throttling module 310 communicatively connected to a first hardware unit. For example, the first throttling module 310 can be communicatively connected to at least one first functional module in the first hardware unit. Here, a plurality of operating systems are operated on the first hardware unit, and the first throttling module 310 corresponds to the first operating system. The first functional module may include a functional module that operates the first operating system and a functional module that is managed by the first operating system. The first throttling module 310 is configured to obtain a usage state of a cache queue for caching access to a second hardware unit by the plurality of operating systems operated by the first hardware unit, determine a first throttling parameter of the first operating system based on the usage state of the cache queue, and control the bandwidth of the access of the first operating system to the second hardware unit based on the first throttling parameter.
[0139] Here, the cache queue is used to cache accesses to the second hardware unit by multiple operating systems, for example, the cache queue is used to cache read access instructions and / or write access instructions to the second hardware unit by the multiple operating systems.
[0140] In one implementation, the first throttling parameter includes a target bandwidth threshold for the first operating system, and the first throttling module 310 is configured to control the bandwidth of the first operating system's access to the second hardware unit to be equal to or less than the target bandwidth threshold.
[0141] In one implementation, the bandwidth control device 300 may further include a cache module 320. The cache module 320 is communicatively coupled to the first throttling module 310 and the second hardware unit. The cache module 320 may include a cache queue. A usage status of the cache queue may be indicated by a status value of the cache queue, and a magnitude of the status value characterizes how idle or busy the cache queue is. The cache module 320 is configured to transmit the status value of the cache queue to the first throttling module 310.
[0142] In one example, the cache module 320 may be, for example, a bandwidth sharing module.
[0143] In one implementation, the cache queue may include multiple entries, each of which is used to cache one access instruction, and the state value of the cache queue includes the number of available or unavailable entries in the cache queue, and the cache module 320 is configured to send the number of available or unavailable entries in the cache queue to the first throttling module 310.
[0144] In one implementation, the first throttling module 310 is configured to determine a first throttling parameter from a plurality of throttling parameters of the first operating system based on the state value, where each throttling parameter includes a bandwidth threshold.
[0145] In one implementation, the first throttling module 310 is configured to determine a first interval corresponding to a state value from a plurality of state value intervals, where each state value interval corresponds to one throttling parameter, and determine the throttling parameter corresponding to the first interval as the first throttling parameter.
[0146] In one implementation, the state value intervals are divided by the state thresholds, and the first throttling module 310 is configured to determine the first interval based on a numerical relationship between the state value and the at least one state threshold.
[0147] As can be seen from the above technical solutions, the device provided in the embodiments of the present disclosure can dynamically control the access bandwidth of each operating system to the second hardware unit based on the usage status of the cache queue, make the allocation of bandwidth resources of the second hardware unit more rational, and not only can improve the business performance of each operating system, but also improve the utilization rate of bandwidth resources and reduce the waste of bandwidth resources.
[0148] Exemplary Integrated Circuits An embodiment of the present disclosure further provides an integrated circuit, which may be, for example, an SoC.
[0149] FIG. 8 is a structural schematic diagram of an integrated circuit provided in an exemplary embodiment of the present disclosure.
[0150] As shown in Fig. 8, in one embodiment, the integrated circuit 1000 includes a first hardware unit 10 on which multiple operating systems run. Here, the first hardware unit 10 may include multiple functional modules in the integrated circuit 1000. Each functional module is used to realize one or more functions of the integrated circuit 1000. For example, the functional module may be a CPU, a GPU, an NPU, an ISP, a DSP, etc. Also, the functional module may be a core of a CPU, a streaming processor of a GPU, a computing unit of an NPU, etc.
[0151] In one implementation, each functional module of the first hardware unit 10 can communicate with, eg, access, another hardware unit (eg, the second hardware unit 20).
[0152] Here, the second hardware unit 20 may include a storage device (e.g., memory) or a hardware unit that communicates with other first hardware units 10. Exemplarily, the second hardware unit 20 may be a DRAM and / or an SRAM. In one example, the second hardware unit 20 may be located in the integrated circuit 1000, for example, the second hardware unit 20 may be an SRAM integrated in the SoC. In another example, the second hardware unit 20 may be installed independently of the integrated circuit 1000, for example, the second hardware unit 20 may be a DRAM installed independently of the SoC.
[0153] In one embodiment, the integrated circuit 1000 further includes a plurality of throttling modules 40 communicatively connected to the first hardware unit 10 and arranged in one-to-one correspondence with a plurality of operating systems, at least one of the throttling modules 40 being configured to perform the function of the first throttling module in the bandwidth control device, e.g., steps for implementing the bandwidth control method provided in an embodiment of the present disclosure.
[0154] In one example, the throttling module 40 can obtain the usage status of the cache queue, and based on the usage status of the cache queue, determine throttling parameters of the operating system corresponding to this throttling module 40, and then the throttling module 40 can control the bandwidth of access to the second hardware unit 20 of the operating system corresponding to this throttling module 40 based on the throttling parameters of the operating system corresponding to it.
[0155] In one implementation, the integrated circuit 1000 may further include a bandwidth sharing module 30, where the bandwidth sharing module may also be referred to as a cache module.
[0156] In one example, the bandwidth sharing module 30 includes a cache queue. The usage status of the cache queue may be indicated by a status value of the cache queue, and the bandwidth sharing module 30 may transmit the status value of the cache queue to each throttling module 40.
[0157] As can be seen from the above technical solutions, the integrated circuit provided in the embodiments of the present disclosure can dynamically control the access bandwidth of each operating system to the second hardware unit based on the usage status of the cache queue, so as to make the allocation of bandwidth resources of the second hardware unit more rational, and not only can improve the business performance of each operating system, but also can improve the utilization rate of bandwidth resources and reduce the waste of bandwidth resources.
[0158] <Examples of Electronic Devices> An embodiment of the present disclosure provides an electronic device that can be used in a vehicle, for example, in an intelligent connected vehicle, and may be, for example, an in-vehicle computing device, an in-vehicle computing platform, an in-vehicle computing unit, an intelligent drive computing platform, etc.
[0159] In one embodiment, the electronic device may include an integrated circuit as provided in the embodiments of the present disclosure, which may operate at least one operating system, such as an intelligent driving system and a cockpit system, to implement related functions of the cockpit-driving integrated system.
[0160] In one embodiment, the electronic device further comprises: A housing for accommodating and mounting each device in order to protect each device of the electronic device from dust and water and improve the reliability of the electronic device; a power supply module for supplying power to each hardware unit of the electronic device; A heat dissipation module, such as a heat dissipation fan or a liquid-cooled heat dissipation device, for dissipating heat from devices of an electronic device to reduce the operating temperature of each device and improve the operating stability of each device; The vehicle may include an external interface that is connected to each sensor in the vehicle, such as a camera, laser radar, millimeter wave radar, ultrasonic radar, etc., and is used to send commands to each sensor or receive data returned from the sensor, and further connected to each actuator of the vehicle, such as the drive system, braking system, steering system, etc., and is capable of sending control commands to each system and receiving feedback from each system.
[0161] <Example vehicles> The embodiment of the present disclosure provides a vehicle, which may include a land vehicle, an air vehicle, a water vehicle, an underwater vehicle, a space vehicle, etc. For specific contents of the vehicle, refer to the above embodiment, and the description will be omitted here. The vehicle may include an integrated circuit or electronic device provided in the embodiment of the present disclosure to realize the bandwidth control method provided in the embodiment of the present disclosure.
[0162] Exemplary Computer Program Products and Computer-Readable Storage Media In addition to the above methods and apparatus, the embodiments of the present disclosure may also be a computer program product including computer program instructions that, when executed by a processor, cause the processor to perform the steps of the bandwidth control methods of the various embodiments of the present disclosure described in the "<Exemplary Method>" section above of this specification.
[0163] The computer program product may be written with program code for carrying out operations of the disclosed embodiments in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, and traditional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computing device, partially on the user's device, as a separate software package, partly on the user's computing device and partly on a remote computing device, or entirely on a remote computing device or server.
[0164] In addition, the embodiment of the present disclosure may further include a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, causes the processor to perform the steps of the bandwidth control method of each type of embodiment of the present disclosure described in the "<Exemplary Method>" section above in this specification.
[0165] The computer readable storage medium may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may include, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include an electrical connection having one or more conductors, 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), 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.
[0166] Although the basic principles of the present disclosure have been described above with reference to specific embodiments, it should be noted that the advantages, advantages, effects, etc. mentioned in the present disclosure are merely illustrative and not limiting, and it is not possible to consider that these advantages, advantages, effects, etc. must be provided in each embodiment of the present disclosure. In addition, the specific details disclosed above are merely intended to serve as examples and to facilitate understanding, and are not limiting, and the details disclosed above do not limit the present disclosure to be realized with the specific details disclosed above.
[0167] Block diagrams of devices, apparatus, equipment, and systems according to the present disclosure are merely illustrative examples and are not intended to require or imply that they be necessarily connected, arranged, or configured in the manner shown in the block diagrams. Those skilled in the art will recognize that these devices, apparatus, equipment, and systems can be connected, arranged, or configured in any manner. For example, words such as "including," "containing," and "having" are open-ended terms and can be used interchangeably to mean "including but not limited to." As used herein, "or" and "and" can mean and can be used interchangeably to mean "and / or," unless the context clearly dictates otherwise. As used herein, "for example" can mean and can be used interchangeably to mean "including but not limited to."
[0168] It should also be noted that in the apparatus, device, and method of the present disclosure, each component or each step may be disassembled and / or recombined, and such disassembly and / or recombination should be considered as equivalent means of the present disclosure.
[0169] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the disclosure. Various modifications to these aspects will be apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the disclosure. Thus, the disclosure is not intended to be limited to the aspects shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
[0170] The above description has been presented for purposes of illustration and description. Moreover, the description is not intended to limit the embodiments of the present disclosure to the form disclosed herein. Although several example forms and embodiments have been discussed above, those skilled in the art may recognize certain variations, modifications, variations, additions and subcombinations thereof.
Claims
1. a first hardware unit having a plurality of operating systems running thereon; a second hardware unit communicatively coupled to the first hardware unit; a bandwidth sharing module installed between the first hardware unit and the second hardware unit, the bandwidth sharing module including a cache queue for caching access instructions to the second hardware unit by a plurality of the operating systems, the bandwidth sharing module being used to generate a status value indicating a usage status of the cache queue; a plurality of throttling modules each in one-to-one correspondence with a plurality of the operating systems, each installed between the first hardware unit and the bandwidth sharing module, each used to determine a target bandwidth threshold corresponding to each of the operating systems operated by the first hardware unit based on the state value and a plurality of throttling parameters preset for each of the operating systems, and each used to control the bandwidth of access to the second hardware unit by each of the operating systems operated by the first hardware unit based on the target bandwidth threshold corresponding to each of the operating systems.
2. the first hardware unit includes a plurality of functional modules, and a plurality of the operating systems run in different of the functional modules; Each of the throttling modules is disposed between a functional module of the first hardware unit and the bandwidth sharing module, and the throttling module and the functional module corresponding to the same operating system communicate with each other; 2. The bandwidth control system according to claim 1, wherein each of the functional modules is used to generate an access instruction to the second hardware unit by the operating system corresponding to each of the functional modules.
3. 1. A method for controlling bandwidth, the method being performed by a throttling module in a bandwidth control system, comprising: The bandwidth control method is determining a status value indicating a usage status of a cache queue, the cache queue being for caching respective access instructions to a second hardware unit by a plurality of operating systems operated by the first hardware unit; determining a target bandwidth threshold value corresponding to each of the operating systems operated by the first hardware unit based on the state value and a plurality of throttling parameters preset for each of the operating systems; and controlling a bandwidth of access to the second hardware unit by each of the operating systems operated by the first hardware unit based on a target bandwidth threshold corresponding to each of the operating systems.
4. The step of controlling a bandwidth of access to the second hardware unit by each of the operating systems operated by the first hardware unit based on a target bandwidth threshold value corresponding to each of the operating systems, 4. The bandwidth control method according to claim 3, further comprising a step of controlling, based on a target bandwidth threshold corresponding to each of the operating systems, a bandwidth of access to the second hardware unit by each of the operating systems operated by the first hardware unit so that the bandwidth is equal to or less than a target bandwidth threshold corresponding to each of the operating systems.
5. The step of determining a status value indicating a usage status of the cache queue includes: determining an available number of entries of the cache queue for caching the access instruction; and determining the state value based on a number of available entries of the plurality of entries.
6. determining a target bandwidth threshold value corresponding to each of the operating systems operated by the first hardware unit based on the state value and a plurality of throttling parameters preset for each of the operating systems, determining a first throttling parameter corresponding to each of the operating systems from a plurality of throttling parameters preset for each of the operating systems based on the state value; and determining a target bandwidth threshold corresponding to each of the operating systems based on a first throttling parameter corresponding to each of the operating systems.
7. determining a first throttling parameter corresponding to each of the operating systems from a plurality of throttling parameters preset for each of the operating systems based on the state value, determining a first interval corresponding to the state value from a plurality of preset state value intervals; and determining the first throttling parameter of the first interval corresponding to each of the operating systems from a plurality of throttling parameters preset for each of the operating systems.
8. The step of determining a first interval corresponding to the state value from a plurality of preset state value intervals includes: determining a number of state thresholds for dividing the number of state value intervals; and determining the first interval from the plurality of state value intervals based on a numerical relationship between the state value and at least one state threshold of the plurality of state thresholds.
9. 3. An electronic device comprising the bandwidth control system according to claim 1 or 2.
10. A vehicle including a bandwidth control system according to claim 1 or claim 2, or an electronic device according to claim 9.
11. A computer-readable storage medium storing a computer program for executing the bandwidth control method according to any one of claims 3 to 8.
Citation Information
Patent Citations
Process scheduling system, process scheduling method, and program
JP2007041771A
Information processor and access control method
JP2007334748A
Resource request arbitration device, resource request arbitration method, and computer program
JP2009134766A
Systems and methods for memory bandwidth allocation
US20240061780A1
Adaptive bandwidth throttling for individual virtual services supported on a network server
US6222856B1