Bandwidth control method and system, electronic device and vehicle
Patent Information
- Application Number
- JP2024212558
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-08-19
- Filing Date
- 2024-12-05
- Publication Date
- 2025-03-05
- Estimated Expiration
- 2044-12-05
AI Technical Summary
【0009】 本開示の実施例に係る技術的構成によれば、第1のハードウェアユニットにおける複数の機能モジュールがそれぞれ異なるオペレーティングシステムを実行する場合、第1のハードウェアユニットにおける複数の機能モジュールにそれぞれ対応する帯域幅レベルを確定し、各機能モジュールにそれぞれ対応する帯域幅レベルに基づき、各機能モジュールが第2のハードウェアユニットにアクセスする帯域幅をそれぞれ制御することにより、各オペレーティングシステムに対応する機能モジュールが第2のハードウェアユニットにアクセスする帯域幅を、各オペレーティングシステムによって得られた帯域幅リソースにそれぞれマッチングさせて、アクセス遅延を低減し、データ待ちを減少し、プロセッサの実行効率及びオペレーティングシステムの性能を向上させることができる。
Smart Images

Figure 2025029165000001_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, and vehicles. [Background technology]
[0002] When some integrated circuits (e.g., a system on chip (SoC)) run multiple operating systems (OS), each operating system can call the processor of the SoC to access at least one hardware unit (e.g., memory) to read commands to be executed and to write results of command execution. Each hardware unit can be assigned to and used by at least one operating system.
[0003] The bandwidth resources of different hardware units are different, and when the same hardware unit is assigned to and used by multiple operating systems, the bandwidth resources obtained by each operating system may be different, so that the bandwidth with which the operating system accesses the hardware unit cannot match the bandwidth resources obtained by the operating system, which may cause increased access delays and data waiting, and reduce the execution efficiency of the processor and the performance of the operating system. Summary of the Invention [Problem to be solved by the invention]
[0004] Embodiments of the present disclosure provide a bandwidth control method, system, integrated circuit, electronic device, and vehicle that can control the bandwidth with which the operating systems access a hardware unit when multiple operating systems are executed on an integrated circuit, and match the bandwidth with which the operating systems access a hardware unit to the bandwidth resources obtained by the operating systems. [Means for solving the problem]
[0005] A bandwidth control method according to a first aspect of the present disclosure includes a step of determining bandwidth levels corresponding to each of a plurality of functional modules in a first hardware unit, and a step of controlling the bandwidth through which each functional module accesses a second hardware unit based on the bandwidth levels corresponding to each functional module.
[0006] A bandwidth control system according to a second aspect of the present disclosure includes a first hardware unit including a plurality of functional modules, a second hardware unit communicating with the plurality of functional modules, and a plurality of bandwidth control modules provided in one-to-one correspondence with the plurality of functional modules, each bandwidth control module being provided between the first hardware unit and the second hardware unit, each bandwidth control module determining a bandwidth level corresponding to each functional module in the first hardware unit, and controlling a bandwidth with which each functional module accesses the second hardware unit based on the bandwidth level corresponding to each functional module.
[0007] An electronic device according to a third aspect of the present disclosure includes the bandwidth control system according to the second aspect.
[0008] A vehicle according to a fourth aspect of the present disclosure includes the bandwidth control system according to the third aspect or the electronic device according to the fourth aspect. Effect of the Invention
[0009] According to the technical configuration of an embodiment of the present disclosure, when multiple functional modules in a first hardware unit run different operating systems, bandwidth levels corresponding to each of the multiple functional modules in the first hardware unit are determined, and the bandwidth through which each functional module accesses the second hardware unit is controlled based on the bandwidth levels corresponding to each functional module, so that the bandwidth through which the functional module corresponding to each operating system accesses the second hardware unit can be matched to the bandwidth resources obtained by each operating system, thereby reducing access delays, decreasing data waiting, and improving the execution efficiency of the processor and the performance of the operating system. [Brief description of the drawings]
[0010] [Figure 1] FIG. 1 is a block diagram of the structure of a cockpit-driving integrated system according to one exemplary embodiment of the present disclosure. [Diagram 2] FIG. 2 is a schematic diagram of the structure of a bandwidth control system according to one exemplary embodiment of the present disclosure. [Diagram 3] FIG. 2 is a schematic diagram of the structure of a bandwidth control system according to another exemplary embodiment of the present disclosure. [Figure 4] 4 is a flowchart of a bandwidth control method according to an exemplary embodiment of the present disclosure. [Diagram 5] 1 is a flowchart of step S130 of a bandwidth control method according to an exemplary embodiment of the present disclosure. [Figure 6] 1 is a flowchart of step S131 of a bandwidth control method according to an exemplary embodiment of the present disclosure. [Figure 7] FIG. 2 is a schematic diagram of a bandwidth control module obtaining a bandwidth level according to an embodiment of the present disclosure; [Figure 8] 4 is a flowchart of a bandwidth control method according to another exemplary embodiment of the present disclosure. [Figure 9]11 is a flowchart of a bandwidth control method according to yet another exemplary embodiment of the present disclosure. [Figure 10] 11 is a flowchart of step S530 of a bandwidth control method according to an exemplary embodiment of the present disclosure. [Figure 11] FIG. 2 is a schematic diagram of dynamically controlling access bandwidth according to one exemplary embodiment of the present disclosure. [Figure 12] FIG. 13 is a schematic diagram of dynamically controlling access bandwidth according to another exemplary embodiment of the present disclosure. [Figure 13] 1 is a schematic diagram of the structure of a bandwidth control device according to an embodiment of the present disclosure; [Figure 14] FIG. 2 is a schematic diagram of the structure of a bandwidth control device according to another embodiment of the present disclosure; [Figure 15] 1 is a schematic diagram of an integrated circuit structure according to one embodiment of the present disclosure. [Figure 16] 2 is a schematic diagram of an integrated circuit structure according to another embodiment of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0011] Hereinafter, exemplary embodiments according to the present disclosure will be described in detail with reference to the drawings. The described embodiments are merely some of the embodiments of the present disclosure, and are not all of the embodiments of the present disclosure, and the present disclosure is not limited to the exemplary embodiments described herein.
[0012] Unless otherwise specified, the relative arrangement of parts and steps, numerical expressions and values described in these examples do not limit the scope of the present disclosure.
[0013] A "bus" is a channel that connects modules / units in a computer system and realizes data transmission. The main function of a bus is to transmit data, addresses, and control signals between different modules / units (e.g., processor, memory, input / output (I / O) module, memory controller).
[0014] "Bandwidth" is the amount of data transmitted per unit of time. The units of bandwidth may be bits per second (bps), kilobits per second (Kbps), megabits per second (Mbps), gigabits per second (Gbps), etc., or may be bytes per second (B / s), kilobytes per second (KB / s), megabytes per second (MB / s), gigabytes per second (GB / s), etc.
[0015] "Memory" refers to a component in a computer system that temporarily stores data and commands to facilitate rapid access and execution by a processor. Memory can include random access memory (RAM), such as dynamic random access memory (DRAM) and static random access memory (SRAM).
[0016] "Bandwidth resource" is the maximum amount of data that can be transmitted per unit of time. The unit of bandwidth resource can be bps, kbps, Mbps, Gbps, etc.
[0017] "Memory bandwidth", also called the bandwidth resource of a memory, refers to the maximum amount of data that a memory can transmit per unit time.
[0018] An "SoC" is an integrated circuit that integrates multiple modules / units of a computer system onto a single chip. Modules / units that can be integrated into an SoC include a central processing unit (CPU), a graphics processing unit (GPU), SRAM, an I / O interface, a digital signal processing (DSP), a neural processing unit (NPU), and an image signal processing (ISP). <Application Overview>
[0019] An operating system can be executed on the integrated circuit. For example, the integrated circuit can include a processor, and the operating system can be executed by the processor. The processor can establish communication with a memory (e.g., DRAM and SRAM) via a bus. Thus, while the operating system is executed, the operating system can load commands into the memory, and the processor can read the commands and data from the memory via the bus, perform various operations based on these commands, such as, for example, arithmetic operations, logical operations, and data transfer, and then write the results of the command execution to the memory via the bus.
[0020] High performance integrated circuits are capable of running multiple operating systems.
[0021] FIG. 1 is a block diagram of the structure of a cockpit-driving integrated system according to one exemplary embodiment of the present disclosure.
[0022] The cockpit-driving integrated system can be applied to, for example, vehicles (e.g., intelligent connected vehicles), autonomous vehicles such as steamships, trains, subways, and airplanes, various robots such as service robots, transport robots, automated guided vehicles (AGVs), unmanned ground vehicles (UGVs), and various construction machines.
[0023] 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 functional modules. The one or more functional modules may include, for example, one or more CPUs, one or more GPUs, one or more ISPs, one or more DSPs, etc., and / or one or more NPUs. These functional modules may provide computing resources to multiple operating systems to support each operating system in achieving its functions.
[0024] In one embodiment, the cockpit-driving integrated system may further include a memory 200. The memory 200 may store commands and / or data, and the processor may read and execute commands in the memory 200 and write execution results to the memory 200. In one example, the memory 200 may include a memory such as a DRAM and / or an SRAM. The memory 200 may be integrated into the SoC 100, such as an SRAM and an embedded DRAM (eDRAM), and thus the memory 200 may be part of the SoC 100, or the memory 200 may be an independent device outside the SoC 100, such as a DRAM. In some examples, the memory 200 may further include a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, etc., and the embodiments of the present disclosure are not specifically limited thereto.
[0025] In one embodiment, the SoC 100 may execute a plurality of operating systems (e.g., operating systems 1 to OSN). Exemplarily, the plurality of operating systems may include at least a cockpit operating system (abbreviated as "cockpit system") and an intelligent driving operating system (abbreviated as "intelligent driving system"). The intelligent driving system is mainly responsible for the autonomous 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 man-machine interaction inside the vehicle, including infotainment, instrument display, media playback, and environmental control, etc. Compared with the cockpit system and the intelligent driving system existing independently, 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.
[0026] When the SoC 100 executes multiple operating systems, the cockpit-driving integrated system may include multiple memories 200 to meet the business needs of the multiple operating systems. The multiple memories 200 may include, for example, at least one SRAM and / or eDRAM integrated in the SoC 100, and / or at least one DRAM, flash memory, etc. independently installed. Exemplarily, as shown in FIG. 1, the memory 200 includes an SRAM integrated in the SoC 100 and a DRAM independently installed with respect to the SoC 100.
[0027] As can be understood, the hardware specifications of different memories 200 may be different, and therefore the bandwidth resources of different memories 200 may also be different. Exemplarily, when the cockpit-driving integrated system includes three memories 200 (e.g., memory 200-1 to memory 200-3), the bandwidth resource of memory 200-1 may be 100 GB / s, the bandwidth resource of memory 200-2 may be 50 GB / s, and the bandwidth resource of memory 200-3 may be 10 GB / s.
[0028] When SoC 100 runs multiple operating systems, different memories 200 may be allocated and used by the different operating systems, and / or the same memory 200 may be allocated and used by the multiple operating systems, such that the multiple operating systems share the bandwidth resources of memory 200, i.e., the bandwidth resources of memory 200 obtained by each operating system may be different.
[0029] For example, when three operating systems are executed on the SoC 100, the memory 200-1 can be assigned to the operating system 1, the memory 200-2 can be assigned to the operating system 2, and the memory 200-3 can be assigned to the operating system 3. When implementing the function of the corresponding operating system, the processor in each SoC transmits access traffic to the memory 200 according to its own maximum capacity. In this case, if the access bandwidth of the processor in the SoC to the memory 200 is larger than the bandwidth resource obtained by the corresponding operating system, access congestion occurs, causing an increase in access delay and data waiting, and reducing the execution efficiency of each functional module and the performance of the operating systems.
[0030] In addition, when the SoC 100 executes multiple operating systems, the same memory 200 can be allocated to multiple operating systems for use, and each operating system can obtain a portion of the bandwidth resource of the processor. For example, the bandwidth resource of the memory 200-1 is 100 GB / s, and the 100 GB / s bandwidth resource is allocated to three operating systems, among which the operating system 1 obtains a bandwidth resource of 40 GB / s, the operating system 2 obtains a bandwidth resource of 30 GB / s, and the operating system 3 obtains a bandwidth resource of 30 GB / s. In such a case, if the bandwidth for the operating system 1 to access the memory 200-1 is larger than the bandwidth resource allocated to the operating system 1, for example, if it is larger than 40 GB / s, the problem of increased access delay and data waiting will occur. Accordingly, the processor executing the operating system 1 needs to wait until the current access transmission is completed before continuing the next operation, which reduces the execution efficiency of the processor and the performance of the operating system 1.
[0031] Embodiments of the present disclosure provide a bandwidth control method, system, integrated circuit, electronic device, and vehicle, which, when an integrated circuit (e.g., an SoC) runs multiple operating systems, control the bandwidth by differentiating the operating systems' accesses to different memories, thereby matching the bandwidth for each operating system to access memory to the bandwidth resources allocated to the operating system, thereby avoiding increased access latency and data waiting problems, and improving the execution efficiency of the processor and the performance of the operating systems. Exemplary Systems
[0032] FIG. 2 is a schematic diagram of the structure of a bandwidth control system according to one exemplary embodiment of the present disclosure.
[0033] The bandwidth control system may be embodied in an integrated circuit, such as an SoC 100. As shown in FIG.
[0034] The first hardware unit 10 may be provided in an integrated circuit (e.g., SoC 100), i.e., the integrated circuit (e.g., SoC 100) includes the first hardware unit 10. For example, the first hardware unit 10 is one or more functional modules 11 on the integrated circuit (e.g., SoC 100). Each functional module 11 is for realizing one or more functions of the integrated circuit (e.g., SoC 100). For example, the functional module 11 may be a CPU, a GPU, an NPU, an ISP, a DSP, etc.
[0035] A plurality of operating systems, such as an intelligent driving system, a cockpit system, and / or other operating systems, can be executed in the first hardware unit 10. A plurality of operating systems are executed in the first hardware unit 10. Different operating systems can be executed in different functional modules 11, or different functional modules 11 can be managed by different operating systems, or different functional modules 11 correspond to different operating systems. That is, the plurality of functional modules correspond to different operating systems, respectively.
[0036] For example, the first hardware unit 10 can execute three operating systems, operating system 1 to operating system 3, and the first hardware unit 10 includes eight CPUs, CPU 1 to CPU 8. The operating system 1 can be executed by CPU 1 and CPU 2 (or CPU 1 and CPU 2 are managed by the operating system 1), the operating system 2 can be executed by CPU 3 to CPU 6 (or CPU 3 to CPU 6 are managed by the operating system 2), and the operating system 3 can be executed by CPU 7 and CPU 8 (or CPU 7 and CPU 8 are managed by the operating system 3). Similarly, one operating system can manage one or more GPUs, one operating system can manage one or more NPUs, one operating system can manage one or more ISPs, and one operating system can manage one or more DSPs.
[0037] In one implementation, each functional module 11 of the first hardware unit 10 can communicate with other hardware units (e.g., the second hardware unit 20). For example, each functional module 11 of the first hardware unit 10 can access the second hardware unit 20.
[0038] For example, each functional module 11 of the first hardware unit 10 and the second hardware unit 20 can be communicatively connected via a bus 30. Specifically, the bus 30 can be an advanced extensible interface (AXI) bus, and the AXI bus can be, for example, A read address channel (AR) for transmitting an address for read access; A read data channel (R) for transmitting read access data; A write address channel (AW) for transmitting the address of a write access; A write data channel (W) for transmitting write access data; It may include five channels called write response channels (B) for transmitting responses to write accesses.
[0039] Of course, buses of other protocols (e.g., advanced high-performance bus (AHB), inter-integrated circuit (I2C) bus, HyperTransport bus, etc.) may be used, and the embodiments of the present disclosure are not limited thereto.
[0040] The second hardware unit 20 may include a memory 200 (e.g., 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. Correspondingly, the bus may be a DRAM bus for a functional module 11 (e.g., a CPU, etc.) in the SoC 100 to access the DRAM, or an SRAM bus for accessing the SRAM. Correspondingly, the memory bandwidth includes the bandwidth of the DRAM bus (abbreviated as "DRAM bandwidth") and / or the bandwidth of the SRAM bus (abbreviated as "SRAM bandwidth").
[0041] In the embodiment of the present disclosure, the first hardware unit 10 and the second hardware unit 20 may be provided on different integrated circuits, for example, the first hardware unit 10 may be provided on the SoC 100, and the second hardware unit 20 may be a DRAM provided independently of the SoC 100. Alternatively, the first hardware unit 10 and the second hardware unit 20 may be provided on the same integrated circuit, for example, the first hardware unit 10 may be provided on the SoC 100, and the second hardware unit 20 may be an SRAM integrated on the SoC 100 chip.
[0042] In one implementation, the second hardware unit 20 may include multiple memories 200, and the types of the multiple memories 200 may be the same, for example, all of the multiple memories 200 may be DRAM or all of the multiple memories 200 may be SRAM. The types of the multiple memories 200 may be different, for example, some of the memories 200 may be DRAM and the remaining memories 200 may be SRAM.
[0043] In one implementation mode, all of the multiple memories 200 can be provided in the SoC 100. Alternatively, all of the multiple memories 200 can be devices provided independently of the SoC 100, or some of the memories 200 can be provided in the SoC 100 and the remaining memories 200 can be devices provided independently. The embodiment of the present disclosure is not specifically limited thereto.
[0044] In addition, when the first hardware unit 10 executes a plurality of operating systems, each operating system calls its corresponding functional module 11 to realize the corresponding function. Correspondingly, in order to realize its own function, each functional module 11 can read commands and data by accessing the second hardware unit 20, or can write the result of command execution, etc. Therefore, the access of each functional module 11 to the second hardware unit 20 can be regarded as the operating system corresponding to each functional module 11 accessing the second hardware unit 20. For example, when the CPU1 and CPU2 execute the operating system 1, the access of the CPU1 and CPU2 to the DRAM can be regarded as the operating system 1 accessing the DRAM.
[0045] In one implementation, each memory 200 of the second hardware unit 20 may have a certain address range, and the address ranges of different memories 200 are different. Each address range may include multiple addresses, and the addresses in different address ranges are different. That is, the multiple memories 200 and the multiple address ranges have a one-to-one corresponding relationship, and each address range may correspond to one memory 200.
[0046] For example, the second hardware unit 20 includes memories 200-1 to 200-N. The address range 1 of the memory 200-1 can be, for example, 0x1000 to 0x1999. The address range 2 of the memory 200-2 can be, for example, 0x2000 to 0x2999. The address range N of the memory 200-N can be, for example, 0xN000 to 0xN999.
[0047] Each address can store a specific length of data, for example, each address can store 1 Byte of data. Therefore, each functional module 11 can access a different memory 200 based on a different address.
[0048] For the convenience of the subsequent description of the technical configuration, in the embodiment of the present disclosure, the access of the functional module 11 to a certain address in the memory 200 can be regarded as the functional module 11 accessing an address range corresponding to this address. In addition, since the functional module 11 and the operating system have a corresponding relationship, the access of the functional module 11 to a certain address range can be regarded as the operating system corresponding to the functional module 11 accessing this address range.
[0049] In one implementation, each memory 200 can be assigned to one or more operating systems for use. For example, by dividing addresses in one memory 200 into multiple address ranges and assigning different address ranges to different operating systems, each operating system can access the address range assigned to it. Thus, it is possible to realize that one memory 200 can be assigned to multiple operating systems for use. Each address range can correspond to one operating system.
[0050] For example, if the memory 200-2 is allocated to the operating systems 1 to 3, The access address of the memory 200-2 is Address range 21, 0x2000~0x2299, Address range 22, 0x2300~0x2599, It can be divided into an address range 23, 0x2600 to 0x2999, and
[0051] Operating system 1 may be assigned address range 21, operating system 2 may be assigned address range 22, and operating system 3 may be assigned address range 23. Thus, operating system 1 may access address range 21, operating system 2 may access address range 22, and operating system 3 may access address range 23.
[0052] In one implementation, when one memory 200 is assigned to multiple operating systems for use, each operating system may be assigned a bandwidth resource of the memory 200. For example, if the memory 200-2 includes a bandwidth resource of 100 Gbps, the bandwidth resource of 50 Gbps may be assigned to the operating system 1, the bandwidth resource of 30 Gbps may be assigned to the operating system 2, and the bandwidth resource of 20 Gbps may be assigned to the operating system 3. The bandwidth resource assigned to each operating system may be fixed or may change dynamically.
[0053] In addition, since there is a correspondence between the operating system and the address range, in the embodiment of the present disclosure, for the convenience of the subsequent description of the technical configuration, allocating a bandwidth resource to an operating system can be regarded as allocating a bandwidth resource to an address range corresponding to the operating system. For example, allocating a bandwidth resource of 50 Gbps to operating system 1 can be regarded as allocating a bandwidth resource of 50 Gbps to address range 21.
[0054] In one embodiment, the bandwidth control system may further include a plurality of bandwidth control modules 40, for example, bandwidth control modules 40-1, 40-2 to 40-N. The plurality of bandwidth control modules 40-1, 40-2 to 40-N are provided in one-to-one correspondence with the plurality of functional modules 11-1, 11-2 to 11-N of the first hardware unit 10. The bandwidth control modules 40 may be provided in a communication link between the corresponding functional module 11 and the second hardware unit 20. For example, the bandwidth control module 40 may be provided on the exit side of the corresponding functional module 11, or the bandwidth control module 40 may be provided downstream of the functional module 11. Therefore, when each functional module 11 accesses the second hardware unit 20, the access (e.g., command, data, etc.) can first pass through the bandwidth control module 40 corresponding to the functional module 11 and then be transmitted to the second hardware unit 20, for example, the access of each functional module 11 can first pass through the bandwidth control module 40 and then be transmitted to the second hardware unit 20 via the bus 30 downstream of the bandwidth control module 40. Each bandwidth control module 40 is for determining a bandwidth level corresponding to each functional module 11 in the first hardware unit 10, and respectively controlling the bandwidth of each functional module 11 accessing the second hardware unit 20 based on the bandwidth level corresponding to each functional module 11.
[0055] In one implementation, each bandwidth control module 40 can correspond to multiple functional modules 11, and in such a case, the bandwidth control module 40 can be provided in a communication link between the corresponding multiple functional modules 11 and the bus 30. Note that, the fewer the functional modules 11 corresponding to each bandwidth control module 40, the finer the granularity of the bandwidth control, and the more the functional modules 11 corresponding to each bandwidth control module 40, the coarser the granularity of the bandwidth control. Therefore, in the embodiment of the present disclosure, the correspondence relationship between the bandwidth control module 40 and the functional modules 11 can be flexibly set according to the granularity demand of the bandwidth control, and is not limited here.
[0056] FIG. 3 is a schematic diagram of the structure of a bandwidth control system according to another exemplary embodiment of the present disclosure.
[0057] 3, in one implementation, the bandwidth control system further includes an instruction module 50, which in one example can be a bandwidth allocation module, for generating a bandwidth level corresponding to each operating system.
[0058] In one implementation, the instruction module 50 can determine a bandwidth level corresponding to the operating system based on a state of the operating system (e.g., a state of the operating system accessing the second hardware unit 20, etc.). The bandwidth level corresponds to the bandwidth resources currently allocated to the operating system. For example, the more bandwidth resources the operating system is currently allocated, the higher the bandwidth level currently associated with the operating system, and the less bandwidth resources the operating system is currently allocated, the lower the bandwidth level currently associated with the operating system.
[0059] In one implementation, as shown in Fig. 3, the bandwidth control system may further include a bandwidth sharing module 60. The bandwidth sharing module 60 is located downstream of each bandwidth control module 40 and upstream of the second hardware unit 20. The bandwidth sharing module 60 is communicatively connected to each bandwidth control module 40 and the second hardware unit 20. Therefore, the access of each functional module 11 can first reach the bandwidth control module 40 and then be transmitted to the second hardware unit 20 via the bandwidth sharing module 60.
[0060] In one implementation, the bandwidth sharing module 60 has a corresponding register in which a command queue is stored for caching access commands (e.g., read access commands and write access commands) for each functional module 11 to access the second hardware unit 20.
[0061] In one implementation, the instruction module 50 can determine a bandwidth level corresponding to the operating system based on the usage state (e.g., saturation level or idleness level, etc.) of the command queue in the bandwidth sharing module 60. A higher saturation level of the command queue indicates that the operating system transmits more accesses to the second hardware unit 20 and the bandwidth level corresponding to the operating system is low. A higher idle level of the command queue indicates that the operating system transmits fewer accesses to the second hardware unit 20 and the bandwidth level corresponding to the operating system is high.
[0062] In the embodiment of the present disclosure, when the access of the functional module 11 passes through the bandwidth control module 40, the bandwidth control module 40 can perform throttling on this access, thereby controlling the transmission bandwidth downstream of this access. In other words, the bandwidth through which this functional module 11 accesses the second hardware unit 20 is controlled.
[0063] In one implementation, the bandwidth control module 40 can determine an access address range and control the access bandwidth based on the access address range. Since the address range and the operating system have a corresponding relationship, the bandwidth control module 40 can control the bandwidth of the functional module corresponding to the different operating system to access the second hardware unit 20 based on the access address range.
[0064] In another implementation, the bandwidth control module 40 can dynamically control the bandwidth with which each functional module 11 accesses the second hardware unit 20 based on the bandwidth level of the operating system currently corresponding to each functional module 11, thereby allowing the functional module 11 to access the second hardware unit 20 with the bandwidth resources available to the corresponding operating system and avoiding congestion during access.
[0065] Although not shown, the bandwidth control system shown in FIG. 3 further includes a bus provided between the bandwidth control module 40 and the second hardware unit 20. Exemplary Methods
[0066] The bandwidth control method of the present disclosure includes a step of determining bandwidth levels corresponding to each of a plurality of functional modules in a first hardware unit, the plurality of functional modules corresponding to different operating systems, and a step of controlling a bandwidth at which each functional module accesses a second hardware unit based on the bandwidth levels corresponding to each functional module.
[0067] In one implementation, the different functional modules can be managed by or correspond to different operating systems, so that determining the bandwidth levels corresponding to the plurality of functional modules in the first hardware unit can be determining the bandwidth levels corresponding to the plurality of operating systems managing the plurality of functional modules.
[0068] Exemplarily, take the first functional module as an arbitrary functional module among a plurality of functional modules, and the first functional module corresponds to a first operating system. The step of determining a bandwidth level corresponding to the first functional module can be a step of determining a first bandwidth level corresponding to the first operating system. The step of determining a first bandwidth level corresponding to the first operating system can be realized by steps S510-S520 in the following specific embodiment, and will not be described further here.
[0069] In another implementation, different address ranges of the second hardware unit can be assigned to different operating systems, and the different operating systems can correspond to different functional modules, i.e., the different functional modules correspond to different address ranges of the second hardware unit. Thus, determining the bandwidth levels respectively corresponding to the plurality of functional modules can be determining the bandwidth levels respectively corresponding to a plurality of address ranges through which the plurality of functional modules access the second hardware unit.
[0070] In one specific embodiment, the step of controlling the bandwidth through which each functional module accesses the second hardware unit based on the bandwidth level corresponding to each functional module includes the steps of determining a bandwidth threshold corresponding to each functional module based on the bandwidth level corresponding to each functional module, and controlling the bandwidth through which each functional module accesses the second hardware unit based on the bandwidth threshold corresponding to each functional module.
[0071] In one implementation aspect, when different operating systems correspond to different functional modules, the step of determining a bandwidth threshold corresponding to each functional module may be a step of determining a bandwidth threshold corresponding to multiple operating systems that manage multiple functional modules.
[0072] Illustratively, take the first function module as an arbitrary function module among a plurality of function modules, and the first function module corresponds to a first operating system. The step of determining a bandwidth threshold corresponding to the first function module based on a bandwidth level corresponding to the first function module can be a step of determining a first bandwidth threshold corresponding to the first operating system based on a first bandwidth level corresponding to the first operating system. The step of determining a first bandwidth threshold corresponding to the first operating system based on a first bandwidth level corresponding to the first operating system can be realized by step S531 in the following embodiment, and will not be described further here.
[0073] In one implementation aspect, when different functional modules correspond to different address ranges of the second hardware unit, the step of determining bandwidth thresholds respectively corresponding to each functional module can be a step of determining bandwidth thresholds respectively corresponding to different address ranges of the second hardware unit.
[0074] Illustratively, taking the first functional module as an example of an arbitrary functional module among a plurality of functional modules, and the first functional module accesses a first address range of the second hardware unit, determining a bandwidth threshold corresponding to the first functional module based on a bandwidth level corresponding to the first functional module can be determining a first bandwidth threshold corresponding to the first address range based on a bandwidth level corresponding to the first address range. The determining a first bandwidth threshold corresponding to the first address range based on a bandwidth level corresponding to the first address range can be realized by step S1312 in the following embodiment, and will not be described further here.
[0075] In one specific embodiment, the step of determining bandwidth levels corresponding to each of a plurality of functional modules in the first hardware unit includes the steps of determining an address range corresponding to each of the functional modules' access to the second hardware unit, and determining a bandwidth level corresponding to each of the functional modules based on the address range corresponding to each of the functional modules' access to the second hardware unit.
[0076] For example, taking the first functional module accessing a first address range of the second hardware unit as an example, the step of determining a bandwidth level corresponding to the first functional module based on the first address range can be realized based on step S1311 in the following embodiment, and will not be further described here.
[0077] In one specific embodiment, the step of determining an address range corresponding to each functional module's access to the second hardware unit includes the steps of determining an access address corresponding to each functional module's access to the second hardware unit, and determining an address range corresponding to each functional module's access to the second hardware unit based on the access address corresponding to each functional module's access to the second hardware unit.
[0078] Illustratively, taking the first function module accessing the second hardware unit as an example, the step of determining the address through which the first function module accesses the second hardware unit can be realized by step S110 in the following embodiment. Based on the address corresponding to the access of the first function module to the second hardware unit, the step of determining the first address range corresponding to the access of the first function module to the second hardware unit can be realized by step S120 in the following embodiment. Here, no further description is given.
[0079] In one specific embodiment, the step of controlling the bandwidth at which each functional module accesses the second hardware unit based on a bandwidth threshold corresponding to each functional module includes the step of controlling the bandwidth at which each functional module accesses the second hardware unit based on a bandwidth threshold corresponding to each functional module and a current bandwidth of each address range.
[0080] Illustratively, taking the first functional module accessing a first address range of a second hardware unit as an example, the step of controlling the bandwidth with which the first functional module accesses the second hardware unit based on a bandwidth threshold corresponding to the first functional module can be realized by step S132 in the following embodiment, and will not be described further here.
[0081] In one specific embodiment, the step of controlling the bandwidth with which each functional module accesses the second hardware unit based on a bandwidth threshold corresponding to each functional module and a current bandwidth of each address range includes the steps of determining a bandwidth threshold corresponding to each functional module and a numerical magnitude of the current bandwidth with which each functional module accesses the address range of the second hardware unit, and controlling the bandwidth with which each functional module accesses the second hardware unit based on a bandwidth threshold corresponding to each functional module and a numerical magnitude of the current bandwidth with which each functional module accesses the address range of the second hardware unit.
[0082] In one specific embodiment, the step of controlling the bandwidth of each functional module's access to the second hardware unit based on a bandwidth threshold corresponding to each of the functional modules and a numerical magnitude of a current bandwidth at which each functional module accesses the address range of the second hardware unit includes: transmitting the first functional module's access to the second hardware unit in response to a current bandwidth at which any first functional module among the functional modules accesses the address range of the second hardware unit being smaller than the bandwidth threshold corresponding to the first functional module; and blocking the first functional module's access to the second hardware unit in response to a current bandwidth at which any first functional module among the functional modules accesses the address range of the second hardware unit being equal to or greater than the bandwidth threshold corresponding to the first functional module.
[0083] Take for example a first functional module corresponding to a first bandwidth threshold and a first hardware unit accessing a first address range of a second hardware unit, when the current bandwidth of the first address range is smaller than the first bandwidth threshold, transmit the first functional module's access to the first address range of the second hardware unit, and when the current bandwidth of the first address range is equal to or larger than the first bandwidth threshold, block the first functional module's access to the first address range of the second hardware unit.
[0084] In one specific embodiment, the step of controlling the bandwidth through which each functional module accesses the second hardware unit based on a bandwidth threshold corresponding to each functional module includes a step of controlling the bandwidth through which each functional module accesses the second hardware unit to be smaller than the bandwidth threshold corresponding to each functional module.
[0085] Illustratively, taking the first functional module corresponding to a first bandwidth threshold as an example, the step of controlling the bandwidth through which the first functional module accesses the second hardware unit based on the first bandwidth threshold corresponding to the first functional module can be realized by step S532 in the following embodiment, and will not be described further here.
[0086] A method according to an embodiment of the present disclosure, when multiple functional modules in a first hardware unit run different operating systems, determines bandwidth levels corresponding to each of the multiple functional modules in the first hardware unit, and controls the bandwidth through which each functional module accesses a second hardware unit based on the bandwidth levels corresponding to each functional module, thereby matching the bandwidth through which each functional module corresponding to each operating system accesses the second hardware unit to the bandwidth resources obtained by each operating system, thereby reducing access delays, decreasing data waiting, and improving the execution efficiency of the processor and the performance of the operating system.
[0087] Hereinafter, several embodiments of the present disclosure will be described with reference to the drawings. In some embodiments, each step of the bandwidth control method according to the present disclosure can be performed by any bandwidth control module 40 in the bandwidth control system. For convenience of explanation, in each of the following embodiments, any bandwidth control module 40 in the bandwidth control system is referred to as a first control module, and any functional module 11 communicatively connected to the first control module is referred to as a first functional module.
[0088] FIG. 4 is a flowchart of a bandwidth control method according to one exemplary embodiment of the present disclosure.
[0089] In one embodiment, when different function modules correspond to different address ranges, the bandwidth control method may include the following steps S110 to S130.
[0090] In step S110, obtain a first address of a first access of a first functional module of the first hardware unit 10 to the second hardware unit 20, the first address including at least one address range.
[0091] In a scenario where the first hardware unit 10 runs multiple operating systems, the address ranges of the second hardware unit 20 can be assigned to and used by multiple operating systems, and each operating system can be assigned at least one address range, and each address range may correspond to one memory 200 and one operating system.
[0092] For illustrative purposes, the second hardware unit 20 includes memories 200-1 to 200-3.
[0093] Address range 1 of memory 200-1 is 0x1000 to 0x1999, and when address range 1 is assigned to and used by operating system 1, address range 1 can correspond to operating system 1 and can also correspond to memory 200-1.
[0094] Address range 2 of memory 200-2 is 0x2000 to 0x2999, and address range 2 is further divided into address range 21 (e.g., 0x2000 to 0x2299), address range 22 (e.g., 0x2300 to 0x2599), and address range 23 (0x2600 to 0x2999), and address range 21 is assigned to operating system 1, address range 22 is assigned to operating system 2, and address range 23 is assigned to operating system 3 and used, so that address range 21 corresponds to operating system 1, address range 22 corresponds to operating system 2, and address range 23 corresponds to operating system 3.
[0095] Address range 3 of memory 200-3 is 0x3000 to 0x3999, and if address range 3 is further divided into address range 31 (e.g., 0x3000 to 0x3499) and address range 32 (e.g., 0x3500 to 0x3599), and address range 31 is assigned to operating system 1 and address range 32 is assigned to operating system 3 and used, address range 31 can correspond to operating system 1 and address range 32 can correspond to operating system 3.
[0096] When the first functional module executes any one of the operating systems or is managed by any one of the operating systems, the first functional module can access the second hardware unit 20. For example, the first functional module can access any one of the address ranges assigned to the operating system. In the embodiment of the present disclosure, for convenience of explanation, the access of the first functional module to the second hardware unit 20 can be referred to as a first access, and the access address of the first access can be referred to as a first address.
[0097] In addition, the operating system executed by the first functional module may be fixed and unchanging or may be dynamically changing, and since address ranges corresponding to different operating systems are different, when the first functional module executes different operating systems, the first address may be located in different address ranges.
[0098] Exemplarily, when the first functional module executes the operating system 1, the first functional module can access the address range 1 of the memory 200-1, the address range 21 of the memory 200-2, and the address range 31 of the memory 200-3. Then, the first address can be located within the address range 1, for example, the first address can be 0x1001, the first address can be further located within the address range 21, for example, the first address can be 0x2001, and the first address can be further located within the address range 31, for example, the first address can be 0x3001.
[0099] Exemplarily, when the first functional module executes the operating system 2, the first functional module can access the address range 22 of the memory 200-2. Then, the first address can be located within the address range 22, for example, the first address can be 0x2301.
[0100] In one implementation, the first control module can obtain the first address from an address channel of the bus. For example, if the first access is a read access, the first control module can obtain the first address from a read address channel of the bus, and if the first access is a write access, the first control module can obtain the first address from a write address channel of the bus.
[0101] In step S120, a first address range corresponding to the first address is determined.
[0102] If the second hardware unit 20 includes multiple memories 200, or if the memory 200 in the second hardware unit 20 is assigned to and used by multiple operating systems, the second hardware unit 20 may include multiple address ranges. In this case, in one implementation, the first address may be matched to the multiple address ranges, respectively, to determine the first address range corresponding to the first address.
[0103] Table 1 illustrates, by way of example, the correspondence between the multiple memories 200 of the second hardware unit 20, multiple address ranges, and multiple operating systems, taking the second hardware unit 20 including memories 200-1 to 200-3 as an example.
[0104] [Table 1]
[0105] Referring to Table 1, illustratively, when the first address is 0x1500, the corresponding first address range is address range 1; when the first address is 0x2500, the corresponding first address range is address range 22; and when the first address is 0x3600, the corresponding first address range is address range 32.
[0106] In step S130, the bandwidth of the first access is controlled based on the current bandwidth of the first address range.
[0107] Controlling the bandwidth of the first access may also be referred to as controlling the first access, or performing transmission control on the first access. The manner of controlling the bandwidth of the first access includes, but is not limited to, transmitting the first access or blocking the first access.
[0108] The current bandwidth of the first address range may be the amount of data transmitted per unit time by the first address range at the current time or current time period (e.g., at least one current clock cycle), or the amount of throughput per unit time of the first address range, and the units of the current bandwidth may be, for example, bps, Kbps, Mbps, Gbps, etc.
[0109] For example, if the clock period is 1 ms and the amount of data transmitted by the first address range within one clock period is 1 Gb, the current bandwidth of the first address range is 1000 Gbps.
[0110] Alternatively, the current bandwidth of the first address range can be described as the total bandwidth with which each functional module 11 accesses the first address range at the current time or the current time zone.
[0111] For example, if three functional modules 11 access addresses in the first address range within at least one current clock cycle, and their bandwidths are 10 Gbps, 15 Gbps, and 20 Gbps, respectively, the current bandwidth of the first address range is 45 Gbps.
[0112] Since each address range has a corresponding bandwidth resource, the usage status of the bandwidth resource of the first address range can be determined based on the current bandwidth of the first address range. For example, it can be determined whether there is an idle bandwidth resource in the first address range. Furthermore, the bandwidth of the first access can be controlled. For example, if there is an idle bandwidth resource in the first address range, the first access can be transmitted, and if there is no idle bandwidth resource in the first address range, the first access can be blocked.
[0113] A method according to an embodiment of the present disclosure determines a first address range corresponding to the first address of the first access, and uses the correspondence between the address range and the operating system to control the bandwidth of the first access based on the current bandwidth of the first address range, thereby realizing control of the bandwidth of the operating system corresponding to the first address range accessing the second hardware unit 20, and matching the bandwidth of the operating system accessing the second hardware unit 20 with the bandwidth resources obtained by the operating system, thereby reducing the access delay, reducing data waiting, and improving the execution efficiency of the processor and the performance of the operating system.
[0114] FIG. 5 is a flowchart of step S130 of a bandwidth control method according to an exemplary embodiment of the present disclosure.
[0115] As shown in FIG. 5, in one embodiment, step S130 may include steps S131 to S132.
[0116] In step S131, a first bandwidth threshold corresponding to a first address range is determined.
[0117] The first bandwidth threshold can be a maximum bandwidth allowed when an operating system corresponding to the first address range accesses the first address range.
[0118] In one implementation, the first bandwidth threshold corresponding to the first address range can be less than or equal to the bandwidth resource corresponding to the first address range, and since the bandwidth resources corresponding to different address ranges may be the same or different, the first bandwidth threshold corresponding to different address ranges may be the same or different.
[0119] Exemplarily, if the first address range is Address Range 1 and the bandwidth resource corresponding to the first address range is 50 Gbps, the first bandwidth threshold can be 50 Gbps, 45 Gbps, etc.
[0120] It should be noted that the bandwidth resource corresponding to each address range may be fixed or dynamically changing, so that when the bandwidth resource corresponding to a certain address range changes, the first bandwidth threshold corresponding to this address range may also change, i.e., for any one address range, the first bandwidth threshold corresponding thereto may be a fixed or dynamically changing value.
[0121] In step S132, the bandwidth of the first access is controlled based on the first bandwidth threshold and the current bandwidth of the first address range.
[0122] In one implementation, the first bandwidth threshold can be compared to a numerical magnitude of the current bandwidth of the first address range, and if the current bandwidth of the first address range is less than the first bandwidth threshold, the first access can be transmitted since it indicates that the first address range has idle bandwidth resources, and if the current bandwidth of the first address range is greater than or equal to the first bandwidth threshold, the first access can be blocked since it indicates that the first address range does not have idle bandwidth resources.
[0123] By way of example, assuming that the first bandwidth threshold is 50 Gbps, if the current bandwidth of the first address range is 45 Gbps, it indicates that the first address range has idle bandwidth resources for transmitting the first access, and in such a case, the first control module can transmit the first access to the downstream bus 30 so that the first access is transmitted to the first address via the downstream bus 30.
[0124] Exemplarily, assuming that the first bandwidth threshold is 50 Gbps, if the current bandwidth of the first address range is 55 Gbps, it indicates that the first address range has no idle bandwidth resources for transmitting the first access, and in such a case, the first control module may block the first access so that the first access is not transmitted to the downstream bus 30. Then, if the current bandwidth of the first address range becomes smaller than 50 Gbps, the first control module may transmit the first access so that the first access is transmitted to the first address via the downstream bus 30.
[0125] A method according to an embodiment of the present disclosure controls the bandwidth of a first access based on a first bandwidth threshold corresponding to the first address range and a current bandwidth of the first address range, thereby transmitting the first access downstream if there are idle resources in the first address range and blocking the first access if there are no idle resources in the first address range, and matching the bandwidth of each operating system's access to the first address range to the bandwidth resources corresponding to the first address range.
[0126] FIG. 6 is a flowchart of step S131 of a bandwidth control method according to an exemplary embodiment of the present disclosure.
[0127] As shown in FIG. 6, in one embodiment, step S131 may include steps S1311 to S1312.
[0128] In step S1311, a first bandwidth level corresponding to a first address range is obtained.
[0129] In one implementation, a bandwidth level can be pre-defined for each address range.
[0130] Each address range may include at least one selectable bandwidth level, which is also called a bandwidth level indication or bandwidth indication information, and is not specifically limited herein. The bandwidth levels of different address ranges may be the same or different. When specifically set, the bandwidth level of each address range can be reasonably determined according to factors such as the bandwidth resources corresponding to each address range. Note that the bandwidth level corresponding to each address range may be fixed and unchanging, or may be dynamically changing. For example, when the bandwidth resources allocated to an address range change, the bandwidth level corresponding to this address range can change accordingly.
[0131] In one implementation, the bandwidth level corresponding to each address range can be set in a register, so that the first control module can read the bandwidth level corresponding to each address range from the register, and determine a first bandwidth level corresponding to the first address range based on the read information.
[0132] Exemplarily, five selectable bandwidth levels, for example, bandwidth levels 1 to 5, can be set for an address range, and different bandwidth levels can be represented by different numerical values (for example, 1 to 5) in a register. Bandwidth level 1 can be the lowest level, bandwidth level 2 can be a relatively low level, bandwidth level 3 can be a medium level, bandwidth level 4 can be a relatively high level, and bandwidth level 5 can be the highest level. The number of selectable bandwidth levels for different address ranges can be the same or different, and is not specifically limited here.
[0133] Table 2 shows exemplary bandwidth levels corresponding to multiple address ranges. Note that the values shown in Table 2 are merely examples and are not intended to specifically limit the embodiments of the present disclosure.
[0134] [Table 2]
[0135] That is, if the first address range is address range 1, then based on Table 2, the first control module can determine that the first bandwidth level corresponding to the first address range is bandwidth level 1.
[0136] FIG. 7 is a schematic diagram of the bandwidth control module 40 obtaining the bandwidth level according to one embodiment of the present disclosure.
[0137] As shown in FIG. 7, in one implementation, an integrated circuit (e.g., SoC 100) may include a number of registers corresponding to the number of address ranges. Each register is for storing a bandwidth level corresponding to one address range. Exemplarily, register 1 may store a bandwidth level corresponding to address range 1, register 2 may store a bandwidth level corresponding to address range 2, and register 3 may store a bandwidth level corresponding to address range 3. Each bandwidth control module 40 (e.g., bandwidth control module 40-1 to bandwidth control module 40-N) may read the bandwidth level in each register.
[0138] In one implementation, bandwidth levels corresponding to multiple address ranges may be stored in the same register, thereby reducing the number of registers and hardware complexity of the integrated circuit.
[0139] In one implementation, the bandwidth control module 40 can read the bandwidth level in each register when it receives an access from the functional module 11. Alternatively, the bandwidth control module 40 can periodically read the bandwidth level in each register. For example, a timer can be disposed in the bandwidth control module 40, which periodically times out at a preset length of time, and the bandwidth control module 40 can read the bandwidth level in each register in response to a time-out signal from the timer.
[0140] In step S1312, based on the first bandwidth level, a first bandwidth threshold is determined from a corresponding relationship between at least one bandwidth level corresponding to the first address range and at least one bandwidth threshold.
[0141] In one implementation, a correspondence between at least one bandwidth level and at least one bandwidth threshold can be set for each address range, and each bandwidth level can correspond to one bandwidth threshold, and the same address range has different bandwidth thresholds corresponding to different bandwidth levels.
[0142] In one implementation, a register can store a correspondence between at least one bandwidth level corresponding to each address range and at least one bandwidth threshold, such that when a first bandwidth level corresponding to a first address range is obtained, a bandwidth threshold corresponding to the first bandwidth level can be indexed from the correspondence between the at least one bandwidth level corresponding to the first address range and at least one bandwidth threshold, and the indexed bandwidth threshold is the first bandwidth threshold corresponding to the first address range.
[0143] Exemplarily, the correspondence relationship between at least one bandwidth level and at least one bandwidth threshold corresponding to the address range 1 is as shown in Table 3. Note that the values shown in Table 3 are merely examples and do not specifically limit the embodiments of the present disclosure.
[0144] [Table 3]
[0145] According to Table 3, if the first address range is address range 1 and the first bandwidth level is bandwidth level 1, it can be indexed that the bandwidth threshold corresponding to bandwidth level 1 is 60 Gbps, and therefore it can be determined that the first bandwidth threshold corresponding to address range 1 is 60 Gbps. At this time, if the current bandwidth of address range 1 is smaller than 60 Gbps, the first control module transmits the first access, and if the current bandwidth of address range 1 is equal to or greater than 60 Gbps, the first control module blocks the first access.
[0146] In contrast, if the first address range is address range 1 and the first bandwidth level is bandwidth level 4, it can be indexed that the bandwidth threshold corresponding to bandwidth level 4 is 90 Gbps, and therefore it can be determined that the first bandwidth threshold corresponding to address range 1 is 90 Gbps. At this time, if the current bandwidth of address range 1 is smaller than 90 Gbps, the first control module transmits the first access, and if the current bandwidth of address range 1 is equal to or greater than 90 Gbps, the first control module blocks the first access.
[0147] As can be seen from the above, for any one address range, the bandwidth with which each operating system accesses this address range can be controlled by adjusting the first bandwidth level corresponding to the address range.
[0148] Since each bandwidth level corresponds to one bandwidth threshold, for any one address range, the bandwidth threshold for any one address range can be determined based on the bandwidth level for that address range. That is, the bandwidth level plays a role in indicating the bandwidth threshold. In some implementations, other information such as a flag bit, a register address where the bandwidth threshold is stored, etc., can be used to indicate the bandwidth threshold other than using the bandwidth level, and the embodiments of the present disclosure are not limited thereto.
[0149] It should be noted that the bandwidth resources corresponding to different address ranges may be the same or different, so that at the same bandwidth level, the bandwidth thresholds corresponding to different address ranges may be the same or different.
[0150] Table 4 shows the cases where the bandwidth thresholds corresponding to different address ranges are the same or different at the same bandwidth level. Note that the values shown in Table 4 are merely examples and are not intended to limit the embodiments of the present disclosure.
[0151] [Table 4]
[0152] According to Table 4, when the first bandwidth levels corresponding to address range 1 and address range 21 are both bandwidth level 1, the first bandwidth threshold corresponding to address range 1 is 60 Gbps, and the first bandwidth threshold corresponding to address range 21 is 10 Gbps. Therefore, when the current bandwidth of address range 1 is 30 Gbps, access to address range 1 is transmitted to downstream bus 30. In contrast, when the current bandwidth of address range 21 is 30 Gbps, access to address range 21 is blocked.
[0153] As can be seen from the above, for different address ranges, the same bandwidth level can correspond to different first bandwidth thresholds, thereby enabling the operating system to differentially control the bandwidth for accessing different address ranges.
[0154] FIG. 8 is another flowchart of a bandwidth control method according to an exemplary embodiment of the present disclosure.
[0155] In one embodiment, the method can be performed by any one of the bandwidth control modules 40 of the bandwidth control system. As shown in Fig. 8, the method can include the following steps S410 to S450.
[0156] In step S410, when receiving an access transmitted by functional module 11-x, determine the address range x of the access.
[0157] Exemplarily, an address range x of the access can be determined based on step S110 and step S120.
[0158] In step S420, the bandwidth level x corresponding to the address range x is obtained.
[0159] Exemplarily, based on step S1311, a bandwidth level x corresponding to an address range x can be obtained.
[0160] In step S430, a bandwidth threshold x corresponding to the address range x is determined based on the bandwidth level x corresponding to the address range x.
[0161] Exemplarily, based on step S1312, a bandwidth threshold x corresponding to the address range x can be determined.
[0162] In step S440, it is determined whether the current bandwidth x of the address range x is equal to or greater than the bandwidth threshold x.
[0163] If the current bandwidth x is equal to or greater than the bandwidth threshold x, the bandwidth control module 40-x can block the access. If the current bandwidth x is less than the bandwidth threshold x, the bandwidth control module 40-x can execute step S450 to transmit the access to the downstream bus 30.
[0164] Because different bandwidth control modules 40 correspond to different functional modules 11 and different functional modules 11 correspond to different operating systems, multiple bandwidth control modules 40 can execute the method of the embodiment of the present disclosure in parallel to simultaneously control the bandwidth that multiple operating systems access to the second hardware unit 20, such that the bandwidth that each operating system accesses to the second hardware unit 20 matches the bandwidth resources obtained by each operating system.
[0165] FIG. 9 is a flowchart of a bandwidth control method according to another exemplary embodiment of the present disclosure.
[0166] In an embodiment, when different function modules correspond to different operating systems, the bandwidth control method may include the following steps S510 to S530.
[0167] In step S510, a first operating system that manages a first functional module is determined.
[0168] In one implementation, after the first operating system calls the first functional module, the first functional module generates a logical address, and a memory management unit (MMU) can map the logical address generated by the first functional module to a physical address in the second hardware unit 20, which is a physical address corresponding to the first operating system.
[0169] In one implementation, the first control module can map a logical address of the first functional module to a physical address in the second hardware unit 20, and determine a first operating system that manages the first functional module based on the physical address.
[0170] Of course, the first control module can also determine the first operating system corresponding to the first functional module according to other manners, for example, the memory management unit can determine the first operating system corresponding to the first functional module by transmitting an ID of the first operating system corresponding to the first functional module to the first control module, and the embodiments of the present disclosure are not limited in this regard.
[0171] In step S520, a first bandwidth level corresponding to the first operating system is obtained.
[0172] The first bandwidth level may represent a bus bandwidth allocated to the first operating system, for example, the more bus bandwidth allocated to the first operating system, the higher the first bandwidth level corresponding to the first operating system, and the less bus bandwidth allocated to the first operating system, the lower the first bandwidth level corresponding to the first operating system.
[0173] In one implementation, the instruction module 50 can determine a bandwidth level corresponding to the operating system based on the usage of the command queue in the bandwidth sharing module 60 .
[0174] The command queue usage status may include any parameter value or indication that may indicate how idle / saturated the command queue is.
[0175] In one implementation, the usage status of the command queue may include a first status value, which may indicate the idleness or saturation of the command queue. The command queue may include multiple channel entries, each of which may cache one access command, such as a read channel for caching read access commands and a write channel for caching write access commands. A channel in which an access command is cached is an unavailable channel, and a channel in which an access command is not cached is an available channel.
[0176] By way of example, if a command queue contains 10 channels and commands are cached on 8 channels, then the number of available channels in the command queue is 2 and the number of unavailable channels is 8; if commands are cached on 2 channels, then the number of available channels in the command queue is 8 and the number of unavailable channels is 2.
[0177] In one implementation, the first state value may include the number of available channels (also referred to as the number of idle channels) or the number of unavailable channels (also referred to as the number of non-idle channels) in the command queue.
[0178] In addition, when the first status value of the command queue includes the number of available channels of the command queue, a larger first status value indicates a higher idleness of the command queue and a larger idle bandwidth resource of the second hardware unit 20, and a smaller first status value indicates a higher saturation of the command queue and a smaller idle bandwidth resource of the second hardware unit 20. When the first status value of the command queue includes the number of unavailable channels of the first queue, a larger first status value indicates a higher saturation of the command queue and a smaller idle bandwidth resource of the second hardware unit 20, and a smaller first status value indicates a higher idleness of the command queue and a larger idle bandwidth resource of the second hardware unit 20.
[0179] In one implementation, the bandwidth sharing module 60 can periodically transmit the first state value of the command queue to the indication module 50. Alternatively, the bandwidth sharing module 60 can transmit the first state value of the command queue to the indication module 50 when it detects a command entering or leaving the command queue, the first state value including the most recent number of available or unavailable channels in the command queue.
[0180] In one implementation, at least one bandwidth level may be preset for each operating system, and a correspondence between the first state value of the command queue and each bandwidth level of the operating system may be preset.
[0181] In addition, in a multi-operating system scenario, the operations of different operating systems may be different, and the bandwidth demands for the second hardware unit 20 may also be different, so for the same first state value, the bandwidth levels corresponding to each operating system may be the same or different, and specifically, they may be reasonably set according to the business demands of each operating system, and are not specifically limited here.
[0182] In one implementation, the different first state values correspond to different bandwidth levels. For example, the command queue may include 10 channels and the first state value (e.g., the number of available channels) may include 10, and the 10 first state values correspondingly correspond to 10 bandwidth levels, e.g., the number of available channels is 10 and the corresponding bandwidth level is 1, the number of available channels is 9 and the corresponding bandwidth level is 2.
[0183] In one implementation, the different state value ranges correspond to different bandwidth levels. The first state values are divided into a plurality of state value ranges, each state value range including at least one of the first state values, and each state value range corresponds to one bandwidth level.
[0184] For example, assuming that the command queue includes 10 channels and the first state value includes the number of available channels, the correspondence between the state value range and the bandwidth level of each operating system may be as shown in Table 5. Note that the values shown in Table 5 are merely examples and do not specifically limit the embodiments of the present disclosure.
[0185] [Table 5]
[0186] As shown in Table 5, the bandwidth levels corresponding to operating system 1 include 1-2, with corresponding state value ranges of 6-10 available channels and 1-5 available channels. The bandwidth levels corresponding to operating system 2 include 1-3, with corresponding state value ranges of 8-10 available channels, 5-7 available channels, and 1-4 available channels. The bandwidth levels corresponding to operating system 3 include 1-5, with corresponding state value ranges of 9-10 available channels, 7-8 available channels, 5-6 available channels, 3-4 available channels, and 1-2 available channels.
[0187] Therefore, the instruction module 50 can determine a bandwidth level corresponding to the obtained first status value from a plurality of bandwidth levels corresponding to each operating system based on the first status value transmitted by the bandwidth sharing module 60.
[0188] For example, when the number of available channels included in the first status value is 6, the instruction module 50 can determine that the bandwidth level corresponding to operating system 1 is 1, the bandwidth level corresponding to operating system 2 is 2, and the bandwidth level corresponding to operating system 3 is 3.
[0189] Illustratively, the correspondence between the bandwidth level and the first state value of each operating system may be stored in a register corresponding to the indication module 50 .
[0190] In one implementation, the instruction module 50 can determine the bandwidth level corresponding to each operating system, and then write the bandwidth level corresponding to each operating system to the corresponding register. In one example, the instruction module 50 can generate a corresponding bandwidth level indication based on the bandwidth level corresponding to each operating system, and write the bandwidth level indication to the corresponding register. The instruction module 50 can generate one bandwidth level indication, and the one bandwidth level indication is for indicating the bandwidth level corresponding to each operating system. Or, the instruction module 50 can generate multiple bandwidth level indications, and each bandwidth level indication correspondingly indicates a bandwidth level corresponding to one operating system.
[0191] In one implementation, the first control module can read the bandwidth levels respectively corresponding to each operating system from a register corresponding to the instruction module 50 .
[0192] In one implementation, the first control module can read a bandwidth level indication from a register corresponding to the indication module 50, and determine a bandwidth level corresponding to each operating system respectively based on the bandwidth level indication.
[0193] In one implementation, the first control module can periodically read the bandwidth levels corresponding to each operating system from a register corresponding to the instruction module 50 .
[0194] In one implementation, the instruction module 50 can write the bandwidth level of each operating system into a register, and then transmit a read command to the first control module, which can read the bandwidth level corresponding to each operating system from the register corresponding to the instruction module 50 according to the read command.
[0195] In one implementation, the first control module can determine a first bandwidth level corresponding to the first operating system based on the bandwidth levels corresponding to each acquired operating system. For example, the first control module can obtain that the bandwidth level corresponding to OS1 is 1, the bandwidth level corresponding to OS2 is 2, and the bandwidth level corresponding to OS3 is 1, and if the first operating system is OS1, the first control module can determine that the bandwidth level corresponding to the first operating system is 1.
[0196] In step S530, a first bandwidth for the first functional module to access the second hardware unit is controlled based on the first bandwidth level.
[0197] The first bandwidth is the bandwidth through which the first functional module accesses the second hardware unit 20 .
[0198] In one implementation, when the access of the first functional module to the second hardware unit 20 is via the first control module, the first control module can throttle the access based on a first bandwidth level corresponding to the first operating system to control a first bandwidth through which the first functional module accesses the second hardware unit 20.
[0199] As can be seen from the above technical configuration, the method according to the embodiment of the present disclosure can perform throttling for each functional module 11 corresponding to an operating system based on a bandwidth level corresponding to the operating system, thereby avoiding congestion of access of the functional module 11 to the second hardware unit 20.
[0200] FIG. 10 is a flowchart of step S530 of a bandwidth control method according to an exemplary embodiment of the present disclosure.
[0201] As shown in FIG. 10, in one implementation, step S530 may include the following steps S531 to S532.
[0202] In step S531, a first bandwidth threshold corresponding to a first functional module is determined based on the first bandwidth level.
[0203] The first bandwidth threshold is a maximum bandwidth that can be allowed when the first functional module accesses the second hardware unit when a first operating system corresponding to the first functional module supports the first bandwidth level.
[0204] In one implementation, at least one bandwidth threshold may be predefined for each functional module 11, with a bandwidth level corresponding to each bandwidth threshold predefined.
[0205] A higher bandwidth level indicates a larger memory bandwidth allocated to the operating system, a larger maximum allowable bandwidth for the functional module 11 to access the second hardware unit 20, and a larger bandwidth threshold corresponding to the functional module 11; a lower bandwidth level indicates a smaller memory bandwidth allocated to the operating system, a smaller maximum allowable bandwidth for the functional module 11 to access the second hardware unit 20, and a smaller bandwidth threshold corresponding to the functional module 11.
[0206] Furthermore, since different functional modules 11 have different performance demands, the bandwidth required by different functional modules 11 for the same operating system when accessing the second hardware unit 20 may be the same or different, so when a bandwidth threshold is pre-set for each functional module 11, the bandwidth threshold corresponding to the functional module 11 can be determined according to the performance demand of this functional module 11 and other functional modules 11 that may correspond to the same operating system as this functional module 11.
[0207] In one implementation, the performance demand of the functional module 11 can be indicated by the priority of the functional module 11. For multiple functional modules 11 corresponding to the same operating system, the higher the priority of the functional module 11, the more the bandwidth of the functional module 11 should be satisfied preferentially, i.e., when corresponding to the same bandwidth level, the higher the bandwidth threshold should be set for the functional module 11. On the other hand, the lower the priority of the functional module 11, the more the bandwidth of the functional module 11 can be satisfied later, i.e., when corresponding to the same bandwidth level, the lower the bandwidth threshold can be set for the functional module 11.
[0208] In one implementation, the performance demand of the functional module 11 can be represented by the amount of access data generated when the functional module 11 executes a task. In a plurality of functional modules 11 corresponding to the same operating system, the higher the throughput amount of the functional module 11 required for a business to execute a task, the more bandwidth the functional module 11 needs to access the second hardware unit 20, and in order to ensure the performance and efficiency when the functional module 11 executes a task, the more bandwidth needs to be allocated to this functional module 11, that is, when corresponding to the same bandwidth level, the higher the bandwidth threshold needs to be set to this functional module 11. On the other hand, the lower the throughput amount of the functional module 11 required for a business to execute a task, the less bandwidth the functional module 11 needs to access the second hardware unit 20, that is, the performance and efficiency when the functional module 11 executes a task can be ensured with a relatively small bandwidth, and therefore, when corresponding to the same bandwidth level, the lower the bandwidth threshold can be set to this functional module 11.
[0209] In addition, in a multi-operating system scenario, different operating systems may have different business demands, so when the same functional module 11 is managed by different operating systems, or when the same functional module 11 corresponds to different operating systems, the bandwidth required when accessing the second hardware unit 20 may be the same or different. For example, when the functional module 11-1 is managed by the operating system OS1 (i.e., when the functional module 11-1 corresponds to the operating system OS1), the bandwidth required when accessing the second hardware unit 20 is relatively large, while when the functional module 11-1 is managed by the operating system OS2 (i.e., when the functional module 11-1 corresponds to the operating system OS2), the bandwidth required when accessing the second hardware unit 20 is relatively small. Specifically, the bandwidth threshold corresponding to the functional module 11 can be reasonably set according to the business demand of each operating system, and is not specifically limited here.
[0210] In one implementation, for the same bandwidth level corresponding to different operating systems, the bandwidth thresholds corresponding to the functional modules 11 may be the same.
[0211] Exemplarily, the correspondence between the bandwidth level and the bandwidth threshold may be as shown in Table 6. Note that the values shown in Table 6 are merely examples and do not specifically limit the embodiments of the present disclosure.
[0212] [Table 6]
[0213] As shown in Table 6, for example, if the current functional module 11 corresponds to operating system 1 and the bandwidth level currently corresponding to operating system 1 is 1, the bandwidth threshold corresponding to functional module 11 can be determined to be 70 Gbps; for example, if the current functional module 11 corresponds to operating system 2 and the bandwidth level currently corresponding to operating system 2 is 2, the bandwidth threshold corresponding to functional module 11 can be determined to be 50 Gbps.
[0214] In another implementation, for the same bandwidth level corresponding to different operating systems, different bandwidth thresholds may be corresponding to functional module 11. Depending on the business demands of the operating systems, for the same bandwidth level, if functional module 11 requires relatively more bandwidth when accessing second hardware unit 20, functional module 11 may accommodate a higher bandwidth threshold, and if functional module 11 requires relatively less bandwidth when accessing second hardware unit 20, functional module 11 may accommodate a lower bandwidth threshold.
[0215] In one implementation, the correspondence between the bandwidth level and the bandwidth threshold further includes identifier information of an operating system corresponding to the correspondence. The identifier information of the operating system is for identifying the operating system corresponding to the correspondence, and may include an ID, an address, a name, etc. of the operating system. When determining the bandwidth threshold corresponding to the first function module, the first control module determines the correspondence corresponding to the first operating system from each correspondence, and then determines the bandwidth threshold corresponding to the first function module based on the correspondence.
[0216] Exemplarily, the correspondence between the bandwidth levels and the bandwidth thresholds may be as shown in Table 7. Note that the values shown in Table 7 are merely examples and do not specifically limit the embodiments of the present disclosure.
[0217] [Table 7]
[0218] As shown in Table 7, for example, if the first functional module currently corresponds to operating system 1, and the bandwidth level corresponding to operating system 1 is 1, the first control module can determine from each correspondence that the corresponding relationship corresponding to operating system 1 is the correspondence relationship between the bandwidth threshold and the bandwidth level in the first column based on the name of the first operating system (e.g., “OS1”), and the first control module can determine from this correspondence that the bandwidth threshold corresponding to bandwidth level 1 is 70Gbps, that is, the first bandwidth threshold corresponding to the first functional module is 70Gbps. For example, if the first functional module currently corresponds to operating system 3, and the bandwidth level corresponding to operating system 3 is 3, the first control module can determine from each correspondence that the corresponding relationship corresponding to operating system 3 is the correspondence relationship between the bandwidth threshold and the bandwidth level in the third column based on the name of the first operating system (e.g., “OS3”), and the first control module can determine from this correspondence that the bandwidth threshold corresponding to bandwidth level 3 is 40Gbps, that is, the first bandwidth threshold corresponding to the first functional module is 40Gbps.
[0219] In one implementation, the correspondence between the bandwidth level and the bandwidth threshold corresponding to each functional module 11 can be stored in a register corresponding to the corresponding bandwidth control module 40. Each bandwidth control module 40 can correspond to one register, or multiple bandwidth control modules 40 can share a register, and is not limited here.
[0220] In step S532, the first bandwidth is controlled based on a first bandwidth threshold.
[0221] In one implementation, the first bandwidth is controlled to be less than or equal to a first bandwidth threshold.
[0222] In one implementation, when access of the first functional module to the second hardware unit 20 is via the first control module, the first control module may throttle the access based on a first bandwidth threshold so that the first bandwidth through which the first functional module accesses the second hardware unit 20 is equal to or less than the first bandwidth threshold.
[0223] In one example, referring to the schematic diagram of dynamically controlling access bandwidth shown in FIG. 11, the operating system 1 corresponds to the function module 11-1, the operating system 2 corresponds to the function module 11-2, the function module 11-1 corresponds to the bandwidth control module 40-1, and the function module 11-2 corresponds to the bandwidth control module 40-2. If the bandwidth level corresponding to the operating system 1 is 1 and the bandwidth level corresponding to the operating system 2 is 2, the instruction module 50 transmits the bandwidth levels corresponding to the operating systems 1 and 2 to the bandwidth control module 40-1 and the bandwidth control module 40-2, respectively, for example, the bandwidth level of OS1 is 1 and the bandwidth level of OS2 is 2. Correspondingly, each bandwidth control module can obtain the bandwidth levels corresponding to the operating systems 1 and 2. For example, the bandwidth control module 40-1 can obtain that the bandwidth level of OS1 is 1 and the bandwidth level of OS2 is 2. The bandwidth control module 40-2 can obtain that the bandwidth level of OS1 is 1 and the bandwidth level of OS2 is 2. Each bandwidth control module obtains a bandwidth level corresponding to an operating system corresponding to a corresponding function module. The bandwidth control module 40-1 can determine that the bandwidth level corresponding to the operating system 1 is 1 because the bandwidth level of OS1 is 1 and the bandwidth level of OS2 is 2. The bandwidth control module 40-2 can determine that the bandwidth level corresponding to the operating system 2 is 2 because the bandwidth level of OS1 is 1 and the bandwidth level of OS2 is 2. Each bandwidth control module determines a bandwidth threshold corresponding to a corresponding function module based on a correspondence relationship between the bandwidth level and the bandwidth threshold corresponding to the corresponding function module.Referring to Table 7, the bandwidth control module 40-1 can determine the corresponding relationship between the bandwidth level and the bandwidth threshold when the functional module 11-1 corresponds to the operating system 1 based on the name of the operating system 1, and the bandwidth control module 40-1 can determine that the bandwidth threshold currently corresponding to the functional module 11-1 is 70 Gbps based on this corresponding relationship. The bandwidth control module 40-2 can determine the corresponding relationship between the bandwidth level and the bandwidth threshold when the functional module 11-2 corresponds to the operating system 2 based on the name of the operating system 2, and the bandwidth control module 40-2 can determine that the bandwidth threshold currently corresponding to the functional module 11-2 is 30 Gbps based on this corresponding relationship. Each bandwidth control module controls the bandwidth of the functional module accessing the second hardware unit 20 based on the bandwidth threshold corresponding to the corresponding functional module. When the access of the functional module 11-1 to the second hardware unit 20 passes through the bandwidth control module 40-1, the bandwidth control module 40-1 performs throttling on the access based on the bandwidth threshold of 70 Gbps, so that the bandwidth of the access transmitted on the bus is not more than 70 Gbps. When access to the second hardware unit 20 of the functional module 11-2 is via the bandwidth control module 40-2, the bandwidth control module 40-2 throttles the access based on a bandwidth threshold of 30 Gbps so that the bandwidth transmitted on the bus for the access is 30 Gbps or less.
[0224] In another example, referring to the bandwidth control system shown in FIG. 12, the operating system 1 corresponds to the function module 11-1 and the function module 11-2, the function module 11-1 corresponds to the bandwidth control module 40-1, and the function module 11-2 corresponds to the bandwidth control module 40-2. If the bandwidth level corresponding to the operating system 1 is 1, the instruction module 50 transmits the bandwidth level corresponding to the operating system 1 to the bandwidth control module 40-1 and the bandwidth control module 40-2 respectively, for example, the bandwidth level of OS1 is 1. Correspondingly, each bandwidth control module can obtain the bandwidth level corresponding to the operating system 1. For example, the bandwidth control module 40-1 can obtain that the bandwidth level of OS1 is 1, and the bandwidth control module 40-2 can obtain that the bandwidth level of OS1 is 1. Each bandwidth control module obtains the bandwidth level corresponding to the operating system corresponding to the corresponding function module. The bandwidth control module 40-1 can determine that the bandwidth level corresponding to the operating system 1 is 1. The bandwidth control module 40-2 can determine that the bandwidth level corresponding to the operating system 1 is 1. Each bandwidth control module determines a bandwidth threshold corresponding to the corresponding functional module according to the corresponding relationship between the bandwidth level and the bandwidth threshold corresponding to the corresponding functional module. Referring to Table 7, the bandwidth control module 40-1 can determine the corresponding relationship between the bandwidth level and the bandwidth threshold when the functional module 11-1 corresponds to the operating system 1 according to the name of the operating system 1, and based on this correspondence, the bandwidth control module 40-1 can determine that the bandwidth threshold currently corresponding to the functional module 11-1 is 70 Gbps.The bandwidth control module 40-2 can determine the correspondence between the bandwidth level and the bandwidth threshold when the functional module 11-2 corresponds to the operating system 1 based on the name of the operating system 1, and based on this correspondence, the bandwidth control module 40-2 can determine that the bandwidth threshold currently corresponding to the functional module 11-2 is 70 Gbps. Each bandwidth control module controls the bandwidth of the functional module accessing the second hardware unit 20 based on the bandwidth threshold corresponding to the corresponding functional module. When the access of the functional module 11-1 to the second hardware unit 20 is via the bandwidth control module 40-1, the bandwidth control module 40-1 throttles the access based on the bandwidth threshold of 70 Gbps so that the bandwidth of the access transmitted on the bus is 70 Gbps or less. When the access of the functional module 11-2 to the second hardware unit 20 is via the bandwidth control module 40-2, the bandwidth control module 40-2 throttles the access based on the bandwidth threshold of 70 Gbps so that the bandwidth of the access transmitted on the bus is 70 Gbps or less.
[0225] In addition, during the execution of each operating system, the access amount of each operating system to the second hardware unit 20 changes dynamically, and correspondingly, the memory bandwidth allocated to each operating system changes dynamically, and therefore the bandwidth level corresponding to each operating system also changes dynamically. Therefore, the bandwidth threshold determined by the bandwidth control module 40 for the function module 11 also changes dynamically, that is, the bandwidth control module 40 dynamically controls the bandwidth of the function module 11 accessing the second hardware unit 20.
[0226] In one implementation, when the system state of the operating systems changes, for example, when the first state value of the command queue in the bandwidth sharing module 60 changes, the instruction module 50 re-determines the bandwidth level corresponding to each operating system based on the changed first state value and transmits the latest bandwidth level to the first control module. The first control module obtains the latest bandwidth level corresponding to the first functional module and re-determines the first bandwidth threshold corresponding to the first functional module based on the latest bandwidth level. The first control module controls the first bandwidth for the first functional module to access the second hardware unit 20 based on the re-determined first bandwidth threshold.
[0227] Exemplarily, the functional module 11-1 corresponds to the operating system 2, and the bandwidth control module 40-1 corresponding to the functional module 11-1 determines that the bandwidth threshold corresponding to the functional module 11-1 is, for example, 70 Gbps based on the bandwidth level 1 corresponding to the operating system 2, and the functional module 11-1 controls the bandwidth for accessing the second hardware unit 20 to be 70 Gbps or less. When the first state value of the command queue in the bandwidth sharing module 60 changes and memory bandwidth is re-allocated to the operating system 2, the instruction module 50 re-determines the bandwidth level of the operating system 2 based on the changed first state value, and transmits the latest bandwidth level corresponding to the operating system 2 to the bandwidth control module 40-1. For example, the latest bandwidth level corresponding to the operating system 2 is 2. After obtaining the latest bandwidth level corresponding to the operating system 2, the bandwidth control module 40-1 re-determines that the bandwidth threshold corresponding to the functional module 11-1 is, for example, 50 Gbps based on the bandwidth level 2, and controls the bandwidth for accessing the second hardware unit 20 by the functional module 11-1 to be 50 Gbps or less.
[0228] In view of the above, this implementation allows the bandwidth with which the functional module 11 accesses the second hardware unit 20 to adapt to the memory bandwidth dynamically allocated to the operating system.
[0229] In addition, when the tasks executed by each operating system change dynamically during the execution of each operating system, and the functional module 11 corresponding to the operating system changes dynamically correspondingly, the bandwidth level corresponding to the operating system corresponding to the functional module 11 also changes dynamically. Therefore, the bandwidth threshold determined by the bandwidth control module 40 for the functional module 11 also changes dynamically, that is, the bandwidth control module 40 dynamically controls the bandwidth for the functional module 11 to access the second hardware unit 20.
[0230] In one implementation form, when the operating system corresponding to the first functional module is changed, the first control module needs to re-determine the first bandwidth threshold corresponding to the first functional module based on the bandwidth level corresponding to the changed operating system, and control the bandwidth through which the first functional module accesses the second hardware unit 20 based on this re-determined first bandwidth threshold.
[0231] Exemplarily, the functional module 11-1 corresponds to the operating system 1, and the bandwidth control module 40-1 corresponding to the functional module 11-1 determines, based on the bandwidth level 1 corresponding to the operating system 1, that the bandwidth threshold corresponding to the functional module 11-1 is, for example, 70 Gbps, and controls the bandwidth at which the functional module 11-1 accesses the second hardware unit 20 to be 70 Gbps or less. When the functional module 11-1 is changed to correspond to the operating system 2, the bandwidth control module 40-1 obtains the bandwidth level (for example, 2) corresponding to the operating system 2, and then determines again, based on the bandwidth level 2, that the bandwidth threshold corresponding to the functional module 11-1 is, for example, 50 Gbps, and controls the bandwidth at which the functional module 11-1 accesses the second hardware unit 20 to be 50 Gbps or less.
[0232] As described above, this embodiment allows the bandwidth at which the functional module 11 accesses the second hardware unit 20 to adapt to the dynamically changing correspondence between the functional module 11 and the operating system.
[0233] In the embodiment of the present disclosure, the first control module may adopt a bandwidth throttling scheme to control the bandwidth of the first functional module to access the second hardware unit 20, or may adopt an outstanding request throttling scheme to control the bandwidth of the first functional module to access the second hardware unit 20. The first control module may also adopt a combined scheme of bandwidth throttling and outstanding request throttling to control the bandwidth of the first functional module to access the second hardware unit 20. Of course, the first control module may also use other throttling schemes to control the bandwidth of the first functional module to access the second hardware unit 20, and the embodiment of the present disclosure is not limited thereto. Exemplary Devices
[0234] The bandwidth control method according to the embodiment of the present disclosure has been introduced above. Note that an integrated circuit (e.g., SoC 100) or a first hardware unit 10 in the SoC 100 may include corresponding hardware and software for implementing the hardware functions to implement each function of the bandwidth control method.
[0235] As those skilled in the art can easily imagine, referring to the steps of the bandwidth control method described in each embodiment of the present disclosure, each embodiment of the present disclosure may be realized in the form of hardware, or in a combined form realized by a manner in which software drives hardware. Whether a function is executed by hardware or by a manner in which software drives hardware is determined by a specific application and design constraints of a technical configuration. Those skilled in the art may use different methods for each specific application to realize the described functions, but such realization should not be considered beyond the scope of the present disclosure.
[0236] FIG. 13 is a schematic diagram of the structure of a bandwidth control device according to one exemplary embodiment of the present disclosure.
[0237] As shown in FIG. 13, in one embodiment, the bandwidth control device 300 may include a first control module 310 .
[0238] The first control module 310 is provided corresponding to the first functional module of the first hardware unit 10. The first control module 310 is configured to obtain a first address of the first functional module to a first access of the second hardware unit 20, the second hardware unit 20 including at least one address range, the first control module 310 is further configured to determine a first address range corresponding to the first address, and the first control module 310 is further configured to control the bandwidth of the first access based on the current bandwidth of the first address range.
[0239] In one implementation, the first control module 310 is configured to determine a first bandwidth threshold corresponding to the first address range and control the bandwidth of the first access based on the first bandwidth threshold and the current bandwidth of the first address range.
[0240] In one implementation, the first control module 310 is configured to obtain a first bandwidth level corresponding to a first address range, and determine a first bandwidth threshold based on the first bandwidth level from a correspondence relationship between at least one bandwidth level corresponding to the first address range and at least one bandwidth threshold.
[0241] In one implementation, the bandwidth control device may further include a storage module 320. The storage module 320 stores a bandwidth level corresponding to at least one address range, for example, a first bandwidth level corresponding to a first address range. In one example, the storage module 320 may include one or more registers.
[0242] In one implementation, the first control module 310 is configured to obtain a first bandwidth level corresponding to a first address range from the storage module 320.
[0243] In one implementation, the first control module 310 is configured to transmit the first access if the current bandwidth of the first address range is less than a first bandwidth threshold and to block the first access if the current bandwidth of the first address range is greater than or equal to the first bandwidth threshold.
[0244] According to the above technical configuration, the device of the embodiment of the present disclosure utilizes the correspondence between the address range and the operating system, and controls the bandwidth of the first access based on the current bandwidth of the first address range, thereby further controlling the bandwidth of the operating system corresponding to the first address range to access the second hardware unit 20, so as to match the bandwidth of the operating system to access the second hardware unit 20 with the bandwidth resource obtained by the operating system, thereby reducing the access delay, reducing data waiting, and improving the execution efficiency of the processor and the performance of the operating system.
[0245] FIG. 14 is a schematic diagram of the structure of a bandwidth control device according to another exemplary embodiment of the present disclosure.
[0246] As shown in FIG. 14, in one embodiment, the bandwidth control device 300 includes a first control module 310 .
[0247] The first control module 310 is provided in correspondence with a first functional module of a first hardware unit 10. However, the first hardware unit 10 includes at least one functional module 11, which is managed by at least one operating system, and the first hardware unit 10 is communicatively connected to a second hardware unit 20.
[0248] The first control module 310 is configured to determine a first operating system for managing the first functional module, obtain a first bandwidth level corresponding to the first operating system, and control a first bandwidth for the first functional module to access the second hardware unit 20 based on the first bandwidth level.
[0249] In one implementation, the bandwidth control device may further include an instruction module 330. The instruction module 330 is communicatively coupled to the first control module 310. The instruction module 330 is configured to generate bandwidth levels respectively corresponding to the at least one operating system, the bandwidth levels corresponding to the at least one operating system including a first bandwidth level corresponding to the first operating system.
[0250] In one example, the instruction module 330 can be a bandwidth allocation module.
[0251] In one implementation, the bandwidth control device may further include a bandwidth sharing module communicatively coupled to the instruction module 330. The bandwidth sharing module has a corresponding register in which a command queue may be stored, and the command queue may be for caching access commands (e.g., read access commands and write access commands) for each functional module 11 to access the second hardware unit 20. The usage status of the command queue may include a first status value of the command queue. The magnitude of the first status value indicates the idleness or saturation of the command queue. The first status value may include the number of available channels or the number of unavailable channels in the command queue. The bandwidth control device is configured to transmit the first status value of the command queue to the instruction module 330.
[0252] In one implementation, the instruction module 330 is configured to determine the corresponding bandwidth levels based on the states of the operating systems, for example, to determine the bandwidth levels respectively corresponding to each operating system based on the first state value.
[0253] In one implementation, the instruction module 330 is configured to write a bandwidth level corresponding to each operating system respectively to a corresponding register.
[0254] In one implementation, the instruction module 330 is configured to generate a corresponding bandwidth level indication based on the bandwidth level respectively corresponding to each operating system, and write the bandwidth level indication to the corresponding register. The instruction module 330 can generate one bandwidth level indication, where the bandwidth level indication is for indicating a bandwidth level corresponding to each operating system. Or, the instruction module 330 can generate multiple bandwidth level indications, where each bandwidth level indication correspondingly indicates a bandwidth level corresponding to one operating system.
[0255] In one implementation form, the first control module 310 is configured to read a bandwidth level corresponding to each operating system from the instruction module 330, for example, from a register corresponding to the instruction module 330, and determine a first bandwidth level corresponding to the first operating system from the read bandwidth levels corresponding to each operating system.
[0256] In one implementation, the first control module 310 is configured to determine a first bandwidth threshold corresponding to the first functional module based on the first bandwidth level, and control the first bandwidth based on the first bandwidth threshold.
[0257] In one implementation, the first control module 310 is configured to determine a first bandwidth threshold corresponding to the first bandwidth level based on a correspondence between at least one bandwidth level and a bandwidth threshold.
[0258] In one implementation, the first control module 310 is configured to control the first bandwidth to be less than or equal to a first bandwidth threshold.
[0259] According to the above technical configuration, an apparatus according to an embodiment of the present disclosure determines a bandwidth level corresponding to the operating system corresponding to the functional module 11, and then controls the bandwidth with which the functional module 11 accesses the second hardware unit 20 based on this bandwidth level, thereby enabling the functional module 11 to access the second hardware unit 20 using a bandwidth matching the memory bandwidth allocated to the operating system, thereby avoiding access congestion. Exemplary Integrated Circuits
[0260] An embodiment of the present disclosure further provides an integrated circuit, which may be, for example, an SoC.
[0261] FIG. 15 is a schematic diagram of an integrated circuit structure according to one exemplary embodiment of the present disclosure.
[0262] 15, in one embodiment, the integrated circuit 1000 includes a first hardware unit 10, in which multiple operating systems are executed. The first hardware unit 10 may include at least one functional module 11, in which the at least one functional module 11 is managed by at least one operating system, and the first hardware unit 10 is communicatively connected to a second hardware unit 20. Each functional module 11 is for realizing one or more functions of the integrated circuit 1000. For example, the functional module 11 may be a CPU, a GPU, an NPU, an ISP, a DSP, etc.
[0263] In one implementation, each functional module 11 of the first hardware unit 10 can communicate with other hardware units (e.g., the second hardware unit 20), e.g., can access the second hardware unit 20.
[0264] The second hardware unit 20 may include one or more memories 200 (e.g., flash memories) or other hardware units that communicate with the first hardware unit 10. Exemplarily, the second hardware unit 20 may be a DRAM and / or an SRAM. Correspondingly, the memory bandwidth includes the bandwidth of a DRAM bus (abbreviated as "DRAM bandwidth") and / or the bandwidth of an SRAM bus (abbreviated as "SRAM bandwidth").
[0265] In one implementation, at least one memory 200 in the second hardware unit 20 may be located on and part of the integrated circuit 1000 .
[0266] In one embodiment, the integrated circuit 1000 further includes at least one bandwidth control module 40 arranged in one-to-one correspondence with at least one functional module 11, each bandwidth control module 40 being communicatively connected to its corresponding functional module 11, and at least one bandwidth control module 40 being configured to realize the function of a first control module in the bandwidth control device, for example, to realize steps of a bandwidth control method relating to an embodiment of the present disclosure.
[0267] In one example, the bandwidth control module 40 can obtain an address of an access to the second hardware unit 20 of the functional module 11 communicatively connected to it, determine an address range corresponding to the address, and control the bandwidth of the access based on the current bandwidth of the address range.
[0268] According to the above technical configuration, the integrated circuit of the embodiment of the present disclosure utilizes the correspondence between the address range and the operating system, and controls the bandwidth with which the operating system corresponding to the address range accesses the hardware unit based on the current bandwidth of the address range, so as to match the bandwidth with which the operating system accesses the second hardware unit 20 with the bandwidth resources obtained by the operating system, thereby reducing the access delay, decreasing data waiting, and improving the execution efficiency of the processor and the performance of the operating system.
[0269] FIG. 16 is a schematic diagram of an integrated circuit structure according to another exemplary embodiment of the present disclosure.
[0270] As shown in Fig. 16, in one embodiment, the integrated circuit 1000 further includes an instruction module 50 in addition to the configuration shown in Fig. 15. The instruction module 50 can be a bandwidth allocation module. The instruction module 50 is for generating a bandwidth level corresponding to each operating system.
[0271] In one implementation, the instruction module 50 can determine a bandwidth level corresponding to each operating system based on the state of each operating system (e.g., the state of each operating system's access to the second hardware unit 20).
[0272] In one example, the bandwidth control module 40 is configured to determine an operating system corresponding to each functional module 11, obtain a bandwidth level corresponding to each operating system, and control the bandwidth that each functional module 11 managed by each operating system accesses to the second hardware unit 20 based on the bandwidth level corresponding to each operating system.
[0273] According to the above technical configuration, the integrated circuit of an embodiment of the present disclosure dynamically controls the bandwidth with which the functional module 11 accesses the second hardware unit 20 based on a bandwidth level corresponding to the operating system managing the functional module 11, thereby enabling the functional module 11 to access the second hardware unit 20 with the memory bandwidth available to the corresponding operating system, thereby avoiding congestion during access. <Examples of Electronic Devices>
[0274] An embodiment of the present disclosure provides an electronic device, which may 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 driving computing platform, etc.
[0275] In one embodiment, an electronic device may include an integrated circuit according to an embodiment of the present disclosure, the integrated circuit being capable of executing at least one operating system, for example, an intelligent driving system and a cockpit system to implement related functions of an integrated cockpit-driving system.
[0276] In one embodiment, the electronic device comprises: a housing for accommodating and mounting each hardware unit of the electronic device and protecting each hardware unit from the effects of dust and water to 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 cooling device, for dissipating heat from a hardware unit of the electronic device, thereby reducing the running temperature of each hardware unit and improving the running stability of each hardware unit; and an external interface for connecting each sensor in the vehicle, such as a camera, a laser radar, a millimeter wave radar, an ultrasonic radar, etc., to transmit commands to each sensor or receive data from the sensor. The external interface can connect each actuator in the vehicle, such as a drive system, a brake system, a steering system, etc., to transmit control commands to each system or receive feedback from each system. <Example Vehicle>
[0277] The embodiment of the present disclosure provides a vehicle, which may include a land vehicle, an air vehicle, a surface vehicle, an underwater vehicle, a space vehicle, etc. Specific deployment of the vehicle may refer to the above-mentioned embodiment, and will not be described further here. The vehicle may include an integrated circuit or electronic device according to the embodiment of the present disclosure to realize the bandwidth control method according to the embodiment of the present disclosure. Exemplary Computer Program Products and Computer-Readable Storage Media
[0278] In addition to the methods and apparatus described above, embodiments of the present disclosure may provide a computer program product that includes computer program instructions that, when executed by a processor, cause the processor to perform steps in a bandwidth control method according to various embodiments of the present disclosure described in the "Exemplary Method" section above of this specification.
[0279] The computer program product may be produced with program code for carrying out operations of embodiments of the present disclosure 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 computing device, partially on the user device, as a separate software package, partly on the user computing device and partly on a remote computing device, or entirely on the remote computing device or a server.
[0280] Moreover, the embodiments of the present disclosure may further provide a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, may cause the processor to perform steps in the bandwidth control methods of various embodiments of the present disclosure described in the "Exemplary Method" section above of this specification.
[0281] The computer-readable storage medium may be 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 with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), optical fiber, a compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0282] Although the basic principles of the present disclosure have been described above with reference to specific examples, the advantages, merits, effects, etc. mentioned in the present disclosure are merely illustrative and not limiting, and these advantages, merits, effects, etc. are not necessarily possessed by each embodiment of the present disclosure. In addition, the specific details of the above disclosure are merely illustrative and easy-to-understand actions and are not limiting, and the above details do not necessarily limit the present disclosure to be realized by the above specific details.
[0283] Block diagrams of devices, apparatus, equipment, and systems in this disclosure are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured as shown in the block diagrams. These devices, apparatus, equipment, and systems may be connected, arranged, or configured in any manner as would occur to one of ordinary skill in the art. For example, words such as "include," "includes," and "having" are open-ended terms that mean and can be used interchangeably with "including, but not limited to." The terms "or" and "and" used herein mean and can be used interchangeably with the term "and / or." The term "for example" used herein means and can be used interchangeably with the phrase "for example, but not limited to."
[0284] In addition, in the apparatus, device, and method of the present disclosure, each part or each step can be disassembled and / or recombined, and such disassembly and / or recombination should be considered as an equivalent solution of the present disclosure.
[0285] The above description of the disclosed aspects is provided to enable those skilled in the art to make or use the present disclosure. Those skilled in the art may make various modifications to these aspects, and the general principles defined herein may be applied to other aspects without departing from the scope of the present disclosure. Thus, the present 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.
[0286] Those skilled in the art can make various modifications and variations to the present disclosure without departing from the spirit and scope of the present disclosure. Thus, if these modifications and variations of the present disclosure fall within the scope of the claims of the present disclosure and their equivalents, the present disclosure is also intended to include these modifications and variations.
Claims
1. determining bandwidth levels corresponding to a plurality of functional modules in a first hardware unit, each of the plurality of functional modules corresponding to a different operating system; and controlling a bandwidth for each of said functional modules to access a second hardware unit based on a bandwidth level corresponding to each of said functional modules.
2. and controlling a bandwidth for each of the functional modules to access a second hardware unit based on a bandwidth level corresponding to each of the functional modules, the step of: determining a bandwidth threshold value corresponding to each of the functional modules based on a bandwidth level corresponding to each of the functional modules; and controlling a bandwidth for each of the functional modules to access a second hardware unit based on a bandwidth threshold value corresponding to each of the functional modules.
3. The step of determining bandwidth levels corresponding to each of a plurality of functional modules in the first hardware unit includes: determining an address range corresponding to each of the functional modules' accesses to the second hardware unit; and determining a bandwidth level corresponding to each of the functional modules based on an address range corresponding to each of the functional modules' access to the second hardware unit.
4. The step of determining an address range corresponding to an access of each of the functional modules to the second hardware unit includes: determining an access address corresponding to an access of each of the functional modules to the second hardware unit; and determining an address range corresponding to each of the functional modules' accesses to the second hardware unit based on an access address corresponding to each of the functional modules' accesses to the second hardware unit.
5. The step of controlling a bandwidth for each of the functional modules to access a second hardware unit based on a bandwidth threshold value corresponding to each of the functional modules, 4. The bandwidth control method of claim 3, further comprising a step of controlling a bandwidth for each of the functional modules to access a second hardware unit based on a bandwidth threshold corresponding to each of the functional modules and a current bandwidth of each of the address ranges.
6. controlling a bandwidth for each of the functional modules to access a second hardware unit based on a bandwidth threshold corresponding to each of the functional modules and a current bandwidth of each of the address ranges, determining a bandwidth threshold value corresponding to each of the functional modules and a numerical magnitude of a current bandwidth at which each of the functional modules accesses an address range of the second hardware unit; 6. The bandwidth control method of claim 5, further comprising a step of controlling the bandwidth through which each of the functional modules accesses the second hardware unit based on a bandwidth threshold corresponding to each of the functional modules and a numerical value of a current bandwidth through which each of the functional modules accesses the address range of the second hardware unit.
7. The step of controlling the bandwidth of each of the functional modules to access the second hardware unit based on a bandwidth threshold value corresponding to each of the functional modules and a numerical value of a current bandwidth of each of the functional modules to access the address range of the second hardware unit, comprises: transmitting access of a first functional module to the second hardware unit in response to a current bandwidth for accessing an address range of the second hardware unit by any first functional module of the plurality of functional modules being less than a bandwidth threshold corresponding to the first functional module; 7. The bandwidth control method of claim 6, further comprising: in response to a current bandwidth for any first functional module among the plurality of functional modules to access an address range of the second hardware unit being equal to or greater than a bandwidth threshold corresponding to the first functional module, blocking access of the first functional module to the second hardware unit.
8. The step of controlling a bandwidth for each of the functional modules to access a second hardware unit based on a bandwidth threshold value corresponding to each of the functional modules, 3. The bandwidth control method according to claim 2, further comprising the step of controlling a bandwidth for each of the functional modules to access a second hardware unit so that the bandwidth is smaller than a bandwidth threshold value corresponding to each of the functional modules.
9. 1. A bandwidth control system comprising: a first hardware unit including a plurality of functional modules each corresponding to a different operating system; a second hardware unit in communication with the plurality of functional modules; a plurality of bandwidth control modules provided in one-to-one correspondence with the plurality of functional modules, each of the bandwidth control modules being provided between the first hardware unit and the second hardware unit, each of the bandwidth control modules for determining a bandwidth level corresponding to each of the functional modules in the first hardware unit, and for controlling a bandwidth with which each of the functional modules accesses the second hardware unit based on the bandwidth level corresponding to each of the functional modules.
10. an instruction module in communication with each of the bandwidth control modules for generating bandwidth levels corresponding to a plurality of operating systems; 10. The bandwidth control system of claim 9, wherein each of the bandwidth control modules further determines a bandwidth level corresponding to each of the functional modules based on an operating system corresponding to each of the functional modules and a bandwidth level corresponding to each of the plurality of operating systems.
11. An electronic device, 11. An electronic device comprising a bandwidth control system according to claim 9 or 10.
12. A vehicle comprising a bandwidth control system according to claim 9 or 10 or an electronic device according to claim 12.
13. 1. A computer-readable storage medium, comprising: A computer-readable storage medium having stored thereon a computer program for executing the bandwidth control method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Resource allocation in a virtualized environment
JP2012531643A
Bandwidth control circuit, arithmetic processing unit, and bandwidth control method for unit
JP2017045089A
Abnormality management system of multi-os system and abnormality management method of multi-os system
JP2023012019A
Monitoring excessive use of a peripheral device
US10261935B1
Systems and methods for memory bandwidth allocation
US20240061780A1