Memory access bandwidth flow limiting device and method, medium, equipment and chip

By monitoring and controlling the bandwidth information of the device access memory, the problem of unstable device access bandwidth in the system on chip is solved, effective current limiting effect is achieved, and access service quality is ensured.

CN120491903APending Publication Date: 2025-08-15BEIJING HORIZON INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510572812.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-30
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

In systems on chip, it is difficult for the prior art to effectively control the access bandwidth of the device to the memory, resulting in greater jitter when the bandwidth threshold is large, and the current limiting effect is poor when the bandwidth threshold is small, affecting the access service quality of other devices.

Method used

By monitoring the device to access the bandwidth information of the memory, determine the current limiting state, and based on the current limiting state and bandwidth speed control information, the current bandwidth of the control device fluctuates near the specified bandwidth waterline to avoid jitter and exceed the current limiting effect.

Benefits of technology

It effectively avoids the problem of jitter in the device access memory bandwidth and the average bandwidth exceeding the threshold, ensuring the quality of access service of the device.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120491903A_ABST
    Figure CN120491903A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a memory access bandwidth flow limiting device and method, a medium, equipment and a chip, and the device comprises a monitor which is configured to monitor the bandwidth information of a first memory accessed by first equipment; the flow control module is configured to determine a flow limiting state based on the bandwidth information; and controlling the first device to access the current bandwidth of the first memory based on the current limiting state and the bandwidth speed control information. According to the embodiment of the invention, large jitter of the access bandwidth of the first equipment can be effectively avoided under the condition that the bandwidth waterline is relatively large, and the access bandwidth of the first equipment can be ensured to achieve a bandwidth flow limiting effect under the condition that the bandwidth waterline is relatively small.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to memory access technology, and in particular to a memory access bandwidth limiting device, method, medium, equipment and chip. Background Art

[0002] In a system-on-chip (SoC), depending on the quality of service (QoS) requirements of certain SoC devices, bandwidth restrictions on memory access are often required to ensure that the QoS of memory access by other devices in the SoC is met. Effectively controlling the bandwidth of memory access by devices has become a pressing technical challenge. Summary of the Invention

[0003] Embodiments of the present disclosure provide a memory access bandwidth current limiting apparatus, method, medium, device, and chip to effectively control the device's access bandwidth to the memory and improve the current limiting effect of device access in the SoC.

[0004] In a first aspect of an embodiment of the present disclosure, a memory access bandwidth limiting device is provided, comprising: a monitor configured to monitor bandwidth information of a first device accessing a first memory; a flow control module configured to: determine a flow limiting state based on the bandwidth information; and control the current bandwidth of the first device accessing the first memory based on the flow limiting state and bandwidth speed control information.

[0005] A second aspect of an embodiment of the present disclosure provides a method for limiting memory access bandwidth, including: monitoring bandwidth information of a first device accessing a first memory; determining a limiting state based on the bandwidth information; and controlling the current bandwidth of the first device accessing the first memory based on the limiting state and bandwidth speed control information.

[0006] According to a third aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, wherein the storage medium stores a computer program, and the computer program is used to execute the memory access bandwidth limiting method described in any of the above embodiments of the present disclosure.

[0007] According to a fourth aspect of the embodiments of the present disclosure, an electronic device is provided, comprising: a processor; a memory for storing instructions executable by the processor; and the processor for reading the executable instructions from the memory and executing the instructions to implement the memory access bandwidth limiting method described in any of the above embodiments of the present disclosure.

[0008] A fifth aspect of the embodiments of the present disclosure provides a computer program product. When instructions in the computer program product are executed by a processor, the memory access bandwidth limiting method provided by any of the above embodiments of the present disclosure is executed.

[0009] According to a sixth aspect of the embodiments of the present disclosure, a chip is provided, comprising: the memory access bandwidth limiting device provided by any of the above embodiments of the present disclosure.

[0010] Based on the memory access bandwidth current limiting apparatus, method, medium, device, and chip provided by the above-mentioned embodiments of the present disclosure, by monitoring the bandwidth information of the first device accessing the first memory, the current limiting status of the first device is determined based on the bandwidth information, and then the current bandwidth of the first device accessing the first memory is controlled based on the current limiting status and the bandwidth speed control information. The bandwidth speed control information is used by the flow control module to control the bandwidth of the first device accessing the first memory to fluctuate around a specified bandwidth waterline (or bandwidth threshold). For example, when the bandwidth waterline corresponding to the first device is large, the preset bandwidth configured for the first device (which can be called the original bandwidth corresponding to the first device, or the original bandwidth of the first device) is greater than the bandwidth waterline, and the difference between the bandwidth waterline and 0 is large, then the difference between the original bandwidth corresponding to the first device and 0 is large. Based on the bandwidth speed control information, the lower limit value (or lower bound value) of the bandwidth of the first device accessing the memory can be controlled to avoid the situation where the lower bound value of the first device accessing the memory is completely 0, thereby effectively avoiding large jitter of the bandwidth of the first device accessing the memory between the original bandwidth corresponding to the first device and 0. For another example, when the bandwidth waterline corresponding to the first device is small, the difference between the original bandwidth corresponding to the first device and the bandwidth waterline is large, while the difference between the bandwidth waterline and 0 is small. Based on the bandwidth speed control information, the upper limit value (or upper limit value) of the bandwidth of the first device accessing the memory can be controlled to avoid the situation where the upper limit value of the bandwidth of the first device accessing the memory is the original bandwidth corresponding to the first device, thereby avoiding the problem that the average bandwidth of the first device accessing the memory is higher than the bandwidth waterline due to the bandwidth waterline corresponding to the first device being too small, and ensuring that the bandwidth of the first device can achieve the bandwidth limiting effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Figure 1 This is an exemplary application scenario of the memory access bandwidth limiting device provided by the present disclosure;

[0012] Figure 2 1 is a schematic structural diagram of a memory access bandwidth limiting device provided by an exemplary embodiment of the present disclosure;

[0013] Figure 3 is a structural diagram of a memory access bandwidth limiting device provided by another exemplary embodiment of the present disclosure;

[0014] Figure 4 This is a schematic diagram of the principle of bandwidth limiting based on bandwidth threshold in related technologies;

[0015] Figure 5 This is a schematic diagram of the principle of bandwidth limiting when the bandwidth threshold is large;

[0016] Figure 6 This is a schematic diagram of the principle of bandwidth limiting when the bandwidth threshold is small;

[0017] Figure 7 This is a schematic diagram of the current limiting principle when the bandwidth threshold is large, provided by an exemplary embodiment of the present disclosure;

[0018] Figure 8 This is a schematic diagram of the current limiting principle when the bandwidth threshold is small, provided by an exemplary embodiment of the present disclosure;

[0019] Figure 9 1 is a flow chart of a method for limiting memory access bandwidth provided by an exemplary embodiment of the present disclosure;

[0020] Figure 10 is a flow chart of a memory access bandwidth limiting method provided by another exemplary embodiment of the present disclosure;

[0021] Figure 11 is a flow chart of a memory access bandwidth limiting method provided by another exemplary embodiment of the present disclosure;

[0022] Figure 12 1 is a flow chart of a memory access bandwidth limiting method provided by another exemplary embodiment of the present disclosure;

[0023] Figure 13 is a flow chart of a memory access bandwidth limiting method provided by another exemplary embodiment of the present disclosure;

[0024] Figure 14 1 is a flow chart of a memory access bandwidth limiting method provided by another exemplary embodiment of the present disclosure;

[0025] Figure 15 This is a structural diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0026] To explain the present disclosure, example embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments. It should be understood that the present disclosure is not limited to the example embodiments.

[0027] It should be noted that the relative arrangement of components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless specifically stated otherwise.

[0028] Overview of the Disclosure

[0029] In the process of realizing the present disclosure, the inventors found that in a system on chip (SoC), according to the requirements of the work scenario for the quality of service of the business, it is usually necessary to limit the bandwidth (or current limiting) of the access of certain devices in the SoC to the memory, so as to meet the access service quality of other devices in the SoC to the memory. If the bandwidth threshold and the bandwidth information of the device are used to determine that current limiting is required, the device's access to the memory is blocked. When the bandwidth threshold is large, the instantaneous bandwidth of the device will fluctuate between the pre-configured preset bandwidth corresponding to the device and 0, resulting in a large jitter in the instantaneous bandwidth of the device (i.e., the instantaneous bandwidth of the device accessing the memory). When the bandwidth threshold is small, due to the large gap between the original bandwidth corresponding to the device and the bandwidth threshold, the average bandwidth of the device may be greater than the bandwidth threshold, resulting in a poor current limiting effect. How to effectively control the access bandwidth of the device has become a technical problem that needs to be solved urgently.

[0030] Exemplary Overview

[0031] Figure 1 This is an exemplary application scenario of the memory access bandwidth limiting device provided by the present disclosure. Figure 1As shown, a system on a chip (SoC) may include multiple devices, for example, device 11, device 12, and device 13. Devices 11, 12, and 13 may access a memory 15 through an on-chip network 14. The bandwidth of devices 11 and 12 accessing the memory 15 needs to be limited (or current limited). A memory access bandwidth current limiting device 20 according to an embodiment of the present disclosure may be provided between device 11 and the on-chip network 14, and / or between device 12 and the on-chip network 14. That is, the SoC may include one or more memory access bandwidth current limiting devices, for example, a memory access bandwidth current limiting device 20 corresponding to device 11 to be current limited and / or a memory access bandwidth current limiting device 20 corresponding to device 12, so as to effectively control the bandwidth of each of devices 11 and 12 accessing the memory, and ensure the quality of service of device 13 accessing the memory 15. In actual applications, based on the access service quality requirements of each device to the memory 15 in the application scenario, the devices that need to be current limited (such as device 11 and / or device 12) and the devices with higher access service quality requirements (such as device 13) can be determined. During the operation of the SoC, the current is limited for devices 11 and 12 to prevent the large amount of access to the memory 15 by these devices from affecting the access to the memory 15 by device 13. For example, the sum of the access bandwidth of devices 11 and 12 to the memory 15 is less than or equal to the remaining bandwidth, which refers to the difference between the total bandwidth supported by the memory 15 and the access bandwidth of device 13, thereby ensuring the access service quality of device 13 to the memory 15. Furthermore, a device whose bandwidth needs to be limited by a memory access bandwidth limiting device (hereinafter referred to as a device) 20 when accessing the memory 15 can be used as the first device. Taking device 11 as the first device as an example, the memory access bandwidth limiting device 20 corresponding to device 11 can monitor the bandwidth information of device 11 accessing the memory 15 (i.e., the first memory), and then the memory access bandwidth limiting device 20 can determine the limiting status corresponding to device 11 based on the bandwidth information; then, the memory access bandwidth limiting device 20 can control the current bandwidth of device 11 accessing the memory 15 based on the limiting status and bandwidth speed control information, thereby enabling device 11 to access the memory 15 according to the current bandwidth.The bandwidth control rate information is used by the memory access bandwidth limiting device 20 to control the bandwidth of the device 11 accessing the memory 15 to fluctuate within a certain range of regional values near the specified bandwidth waterline (or bandwidth threshold). For example, when the bandwidth waterline is large, the preset bandwidth configured for the device 11 (called the original bandwidth corresponding to the device 11) is greater than the bandwidth waterline, and the difference between the bandwidth waterline and 0 is large, then the difference between the original bandwidth corresponding to the device 11 and 0 is large, and the memory access bandwidth limiting device 20 corresponding to the device 11 can control the lower limit value of the bandwidth of the device 11 accessing the memory based on the bandwidth control rate information, avoiding the situation where the lower limit value of the device 11 accessing the memory is completely 0, thereby effectively avoiding the bandwidth of the device 11 accessing the memory 15 being within the original limit value corresponding to the device 11. Large jitter between the bandwidth and 0; for another example, when the bandwidth waterline is small, the difference between the original bandwidth corresponding to the device 11 and the bandwidth waterline is large, and the difference between the bandwidth waterline and 0 is small. The memory access bandwidth current limiting device 20 corresponding to the device 11 can control the bandwidth upper limit value of the device 11 accessing the memory 15 based on the bandwidth speed control information, avoiding the situation where the upper limit value of the bandwidth of the device 11 accessing the memory 15 is the original bandwidth corresponding to the device 11, reducing the gap between the bandwidth upper limit value of the bandwidth of the device 11 accessing the memory 15 and the bandwidth waterline, thereby avoiding the problem that the average bandwidth of the device 11 accessing the memory 15 is higher than the bandwidth waterline due to the bandwidth waterline corresponding to the device 11 being too small, and ensuring that the bandwidth corresponding to the device 11 can achieve the bandwidth current limiting effect. Figure 1 The devices in the figure are only illustrated by taking three devices as an example. In actual applications, the number of devices is determined according to the needs of the actual application scenario and is not limited to the number of devices in the figure. The memory 15 can be a memory inside the SoC or a memory outside the SoC. The type of memory 15 can be any type, for example, the memory 15 can be DDR (Double Data Rate Synchronous Dynamic Random Access Memory), Cache (cache memory), SRAM (Static Random-Access Memory), ROM (Read-Only Memory), etc., without specific limitation. Devices such as device 11, device 12, and device 13 may include the CPU (Central Processing Unit), GPU (Graphics Processing Unit), NPU (Neural Network Processing Unit), sensors (such as cameras), and other devices (or components) that need to access the memory 15 in the SoC.

[0032] The memory access bandwidth limiting device of the embodiment of the present disclosure can be applied to any scenario where memory access services exist, including but not limited to scenarios such as smart driving and smart cockpits. For example, it can be applied to chips in corresponding scenarios.

[0033] Exemplary devices

[0034] Figure 2 This is a schematic diagram of the structure of a memory access bandwidth limiting device provided by an exemplary embodiment of the present disclosure. This embodiment can be applied to electronic devices, such as in-vehicle computing platforms or SOCs, such as Figure 2 As shown, the memory access bandwidth current limiting device (hereinafter referred to as the device) 20 of the embodiment of the present disclosure may include: a monitor 21 and a flow control module 22.

[0035] The monitor 21 is configured to monitor bandwidth information of the first device 30 accessing the first storage 40 .

[0036] The flow control module 22 is configured to: determine a flow limiting state based on the bandwidth information; and control a current bandwidth of the first device 30 accessing the first storage 40 based on the flow limiting state and the bandwidth speed control information.

[0037] The first device 30 is a device that has access requirements to the first memory 40. For example, the first device 30 may be Figure 1 The device 11 and / or device 12 in the first memory 40 is used to store the data to be accessed corresponding to the first device 30 and / or other devices. The bandwidth information is used to characterize the information of the access bandwidth of the first device 30 to the first memory 40. The flow limiting state includes a bandwidth flow limiting state (referred to as the first state) and a bandwidth unlimited flow state (referred to as the second state). The bandwidth flow limiting state (first state) indicates that it is currently necessary to limit the access bandwidth of the first device 30 to the first memory 40 to meet the access service quality of other devices accessing the first memory 40. The bandwidth unlimited flow state (second state) indicates that it is currently not necessary to limit the access bandwidth of the first device 30 to the first memory 40. The bandwidth control rate information is pre-configured reference information. The flow control module 22 can control the sending rate of the access command of the first device 30 based on the bandwidth control rate information, or control the access bandwidth of the first device 30 to the first memory 40.

[0038] In some optional embodiments, the flow limiting state can be determined based on the bandwidth information of the first device 30 accessing the first storage 40 and a preconfigured bandwidth threshold (i.e., bandwidth waterline). For example, when the bandwidth information exceeds the bandwidth threshold, the flow limiting state is determined to be the bandwidth limiting state; when the bandwidth information is less than the bandwidth threshold, the flow limiting state is determined to be the bandwidth unlimited state. In the case where the bandwidth threshold is large, the memory access bandwidth limiting device 20 or the flow control module 22 can control the lower limit value of the access bandwidth of the first device 30 based on the bandwidth control information, that is, the instantaneous bandwidth of the first device 30 accessing the first storage 40 in the bandwidth limiting state. The lower limit value is greater than 0 and less than the bandwidth threshold, so that the first device 30 can retain a certain access bandwidth when accessing the first storage 40, avoiding completely blocking the access of the first device 30, that is, avoiding the lower limit value of the access bandwidth of the first device 30 being 0, thereby avoiding large jitter in the instantaneous bandwidth corresponding to the first device 30 when accessing the first storage 40, that is, avoiding the instantaneous bandwidth of the first device 30 accessing the first storage 40 from jittering between the larger original bandwidth of the first device 30 and 0. The original bandwidth is a preset bandwidth set in advance for the first device 30 in a completely unrestricted state. When the bandwidth threshold is small, the memory access bandwidth limiting device 20 or the flow control module 22 can control the upper limit value of the access bandwidth corresponding to the first device 30 when accessing the first memory 40 based on the bandwidth speed control information, that is, the instantaneous bandwidth of the first device 30 in the bandwidth unrestricted state. This upper limit value is smaller than the original bandwidth of the first device 30 and larger than the bandwidth threshold value, thereby avoiding the situation where the upper limit value of the bandwidth of the first device 30 accessing the first memory 40 is equal to the original bandwidth corresponding to the first device 30, reducing the gap between the upper limit value of the bandwidth of the first device 30 accessing the first memory 40 and the bandwidth waterline, thereby avoiding the situation where the overall average bandwidth of the first device 30 accessing the first memory 40 is higher than the bandwidth threshold value due to the bandwidth threshold corresponding to the first device 30 being too small, and ensuring that the bandwidth corresponding to the first device 30 can achieve the expected limiting effect.

[0039] In some optional embodiments, the monitor 21 may also be referred to as a monitoring circuit. The monitor 21 may determine the bandwidth information of the first device 30 accessing the first memory 40 by monitoring the actual access bandwidth of the first device 30 accessing the first memory 40 in one or more cycles. For example, at time t, the monitor 21 may determine the bandwidth information of the first device 30 accessing the first memory 40 at time t based on the monitored access bandwidth of the first device 30 in one or more time periods before time t. Time t may refer to the current time. For example, the access bandwidths in multiple time periods before time t may be averaged, and the average value may be used as the bandwidth information of the first device 30 accessing the first memory 40 at time t. Exemplarily, the monitor 21 may sample the amount of access data of the first device 30 in a specified time window (or duration, or time period) at regular intervals, with each time window corresponding to a time period. At the current time, the monitor 21 may determine the bandwidth information of the first device 30 accessing the first memory 40 based on the amount of access data corresponding to the first device 30 in the sampled one or more time windows (i.e., multiple time periods). In practical applications, the bandwidth information of the first device 30 accessing the first storage 40 may also be determined in other ways. The determination of the bandwidth information disclosed in the present invention is not limited to the above-mentioned example.

[0040] In some optional embodiments, the monitor 21 may be implemented by one or more devices such as a controller, a counter, a register, an adder, and a multiplier. For example, the register may record the number of configured time windows, the amount of access data of a single access command by the first device 30 to the first memory 40, etc., the counter may count the number of access commands, the adder and multiplier may calculate the amount of access data from the first device 30 to the first memory 40 within one or more time windows, and convert the access data amount into bandwidth, etc., and the controller may control the operating timing of the counter, register, adder, multiplier, etc. The specific implementation method of the monitor 21 monitoring the bandwidth information of the first device 30 accessing the first memory 40 is not limited to the above-mentioned example implementation method.

[0041] In some optional embodiments, the first device 30 may be a CPU, a GPU, an NPU or any other possible device in a SOC, which is not limited in the embodiments of the present disclosure.

[0042] In some optional embodiments, the first memory 40 may be any type of memory, such as DDR, Cache, etc.

[0043] In some optional embodiments, the flow control module 22 may also be referred to as a flow control circuit, which is configured to control the current bandwidth of the first device 30 accessing the first memory 40 based on the flow limiting state and the bandwidth control rate information. The current bandwidth refers to the access bandwidth with which the first device 30 can access the first memory 40 at the current moment. The flow control module 22 controls the current bandwidth of the first device 30 accessing the first memory 40 based on the flow limiting state and the bandwidth control rate information, which means that the flow control module 22 controls the first device 30 to access the first memory 40 at the current moment with the instantaneous bandwidth corresponding to the flow limiting state, in combination with the bandwidth control rate information, for different situations where the flow limiting state is a bandwidth limiting state and a bandwidth unlimited state. That is, different flow limiting states correspond to different current bandwidths. For example, when the above-mentioned bandwidth threshold is large and the current limiting state corresponding to the first device 30 is the first state, the current bandwidth of the first device 30 accessing the first memory 40 is controlled to be the lower limit value that satisfies the bandwidth control information constraint based on the bandwidth control information, thereby avoiding the current bandwidth being 0, that is, the instantaneous bandwidth of the first device 30 accessing the first memory 40 is controlled to satisfy the bandwidth control information constraint; for another example, when the above-mentioned bandwidth threshold is small and the current limiting state is the second state, the current bandwidth of the first device 30 accessing the first memory 40 is controlled to be the upper limit value that satisfies the bandwidth control information constraint based on the bandwidth control information, thereby avoiding the current bandwidth being the original bandwidth of the first device 30.

[0044] In some optional embodiments, the flow control module 22 is a hardware module, implemented, for example, but not limited to, by one or more devices such as a controller, a register, a comparator, and a data selector. For example, the register in the flow control module 22 is used to store configured bandwidth thresholds, bandwidth control information, etc.; the comparator is used to compare the bandwidth threshold with bandwidth information obtained based on the monitor 21 to determine the current limiting state; the controller is used to control the current bandwidth of the first device 30 accessing the first memory 40 based on the current limiting state; and so on. This is only an exemplary implementation method, and any other implementation method that can achieve the corresponding functions can also be used in actual applications, and the present disclosed embodiments are not limited to this.

[0045] In some optional embodiments, the bandwidth limiting device 20 or the flow control module 22 supports at least one of the first working mode, the second working mode, and the preset working mode (or the third working mode). For example, the bandwidth limiting device 20 or the flow control module 22 may read a preconfigured bandwidth threshold and compare the bandwidth threshold with the first threshold. In response to the bandwidth threshold being greater than the first threshold, the bandwidth limiting device 20 or the flow control module 22 operates in the first working mode, for example, switching from the preset working mode to the first working mode. The bandwidth limiting device 20 or the flow control module 22 may also compare the bandwidth threshold with a second threshold, where the second threshold is less than the first threshold. In response to the bandwidth threshold being less than or equal to the second threshold, the bandwidth limiting device 20 or the flow control module 22 operates in the second working mode, for example, switching from the preset working mode to the second working mode. In response to the bandwidth threshold being less than or equal to the first threshold and greater than the second threshold, the bandwidth limiting device 20 or the flow control module 22 operates in the preset working mode (or the third working mode). Among them, if the bandwidth threshold is greater than the first threshold, it means that the bandwidth threshold is too large; if the bandwidth threshold is less than or equal to the second threshold, it means that the bandwidth threshold is too small; if the bandwidth threshold is less than or equal to the first threshold and greater than the second threshold, it means that the bandwidth threshold is within a normal range. Both the first working mode and the second working mode need to control the current bandwidth of the first device 30 accessing the first memory 40 based on the bandwidth control information. The bandwidth control information of different working modes may be different. For example, for the first working mode, the flow control module 22 may control the lower limit value of the access bandwidth of the first device 30 based on the bandwidth control information corresponding to the first working mode; for the second working mode, the flow control module 22 may control the upper limit value of the access bandwidth of the first device 30 based on the bandwidth control information. The preset working mode may not depend on the bandwidth speed control information, that is, when the current limiting state corresponding to the first device 30 is the first state, the flow control module 22 directly blocks the first device 30 from accessing the first memory 40, that is, the access bandwidth of the first device 30 is 0 or approximately 0. When the current limiting state corresponding to the first device 30 is the second state, the flow control module 22 can allow the first device 30 to access the first memory 40 according to the original bandwidth (that is, the preset bandwidth, or the first preset bandwidth).

[0046] In some optional embodiments, the operating mode of the bandwidth limiting device 20 or the flow control module 22 can be controlled by a processor. Specifically, the processor executes a user application and configures the bandwidth limiting device 20 or the flow control module 22 to operate in one of the three aforementioned operating modes according to configuration instructions of the application. For example, the processor can transmit an operating mode control signal to the bandwidth limiting device 20 or the flow control module 22 to control the operating mode of the bandwidth limiting device 20 or the flow control module 22 via the operating mode control signal. Alternatively, the processor can configure the operating mode status in an operating mode status register of the bandwidth limiting device 20 or the flow control module 22. For example, three operating modes correspond to three operating mode status registers, and a value of 1 in the operating mode status register indicates that the corresponding operating mode is enabled, while a value of 0 indicates that the corresponding operating mode is disabled. The bandwidth limiting device 20 or the flow control module 22 triggers the enabling or disabling of the corresponding operating mode according to the operating mode status register, thereby entering the corresponding operating mode.

[0047] In some optional embodiments, the flow control module 22 receives an access command from the first device 30 and, based on the current limiting state and bandwidth control information, controls the forwarding rate of the access command to achieve the purpose of controlling the current bandwidth of the first device 30. For example, after receiving the access command from the first device 30, the flow control module 22 may cache the access command and forward the access command to the on-chip network or the first memory 40 at the forwarding rate corresponding to the current bandwidth, thereby achieving effective control of the instantaneous current bandwidth under different current limiting states and different bandwidth thresholds.

[0048] In some optional embodiments, the memory access bandwidth limiting device 20 of the embodiment of the present disclosure is a circuit with corresponding current limiting function. The memory access bandwidth limiting device 20 can be called a memory access bandwidth current limiting circuit or a memory access bandwidth current limiter, or can be simply called a current limiting circuit or a current limiter.

[0049] In the embodiment of the present disclosure, the bandwidth of the first device 30 accessing the first memory 40 is referred to as the bandwidth of the first device 30. For example, the current bandwidth of the first device 30 accessing the first memory 40 is referred to as the current bandwidth of the first device 30, the average bandwidth of the first device 30 accessing the first memory 40 is referred to as the average bandwidth of the first device 30, the preset bandwidth of the first device 30 accessing the first device 40 is referred to as the preset bandwidth of the first device 30, and so on.

[0050] The memory access bandwidth current limiting device provided in this embodiment monitors the bandwidth information of the first device accessing the first memory, and then determines the current limiting state of the first device based on the bandwidth information, and then controls the current bandwidth of the first device accessing the first memory based on the current limiting state and the bandwidth speed control information. The bandwidth speed control information is used by the flow control module to control the bandwidth of the first device accessing the first memory to fluctuate within a certain bandwidth range near a specified bandwidth waterline (or bandwidth threshold). When the bandwidth waterline is large, the difference between the bandwidth waterline and 0 is large, and the difference between the original bandwidth corresponding to the first device and 0 is large. Based on the bandwidth speed control information, the lower limit value (or lower bound value) of the bandwidth of the first device accessing the memory can be controlled to avoid the first device accessing the memory The lower limit value of the bandwidth of the first device accessing the memory is completely 0, thereby effectively avoiding large jitters between the original bandwidth corresponding to the first device and 0. When the bandwidth waterline is small, the difference between the original bandwidth corresponding to the first device and the bandwidth waterline is large, and the difference between the bandwidth waterline and 0 is small. Based on the bandwidth speed control information, the upper limit value (or upper limit value) of the bandwidth of the first device accessing the memory can be controlled to avoid the situation where the upper limit value of the bandwidth of the first device accessing the memory is the original bandwidth corresponding to the first device, thereby avoiding the problem that the average bandwidth of the first device accessing the memory is higher than the bandwidth waterline due to the bandwidth waterline corresponding to the first device being too small, and ensuring that the access bandwidth of the first device can achieve the bandwidth limiting effect.

[0051] In some optional embodiments, in the above Figure 2 Based on the embodiment shown, the monitor 21 is configured to:

[0052] The amount of access data of the first device 30 accessing the first storage 40 within a specified time period is sampled at preset time intervals; and bandwidth information is determined based on the amount of access data sampled multiple times, the specified time period, and the number of sampling times.

[0053] The preset time interval and the specified duration can be set according to actual needs. For example, the preset time interval can be 0.5 seconds, 1 second, 2 seconds, etc. The specified duration can be 1 millisecond, 2 milliseconds, 3 milliseconds, etc. For example, the amount of access data within a 1 millisecond time window (i.e., the specified duration) is collected every 1 second, and each time window and the corresponding amount of access data are recorded.

[0054] In some optional embodiments, the monitor 21 may determine the bandwidth information of the first device 30 at a certain frequency or period. For example, each time the amount of access data of the first device 30 accessing the first storage 40 within a specified time period is sampled, the corresponding bandwidth information of the first device 30 is determined based on the most recently sampled amount of access data and the amount of access data from one or more historical samples. When the current moment arrives at the time for determining the bandwidth information corresponding to the first device 30, the bandwidth information of the first device 30 may be determined based on the amount of access data collected in multiple recent time windows (i.e., the amount of access data sampled multiple times), combined with the specified time period of each time window and the number of sampling times (i.e., the number of time windows used), according to preconfigured calculation rules. For example, the amount of access data in multiple time windows is accumulated to obtain the total amount of access data. The ratio of the total amount of access data to the total time period of the multiple time windows is the amount of access data per unit time. If the unit time is not seconds, the amount of access data per unit time is converted into the amount of access data within 1 second, which serves as the bandwidth information for the first device 30 accessing the first storage device 40.

[0055] In some optional embodiments, the weight of each time window can be determined based on the timing relationship of each time window (i.e., each sampling), with the weight of the time window farther from the current moment being smaller, and the weight of the time window closer to the current moment being larger. Then, based on the weight of each time window, the amount of accessed data in each time window, the specified duration, and the number of sampling times, the bandwidth information can be determined to improve the timeliness of the amount of accessed data and further improve the validity of the bandwidth information. For example, based on the weight of each time window, the amount of accessed data in each time window is weighted and summed to obtain the total amount of accessed data. The ratio of the total amount of accessed data to the total duration of multiple time windows is the amount of accessed data per unit time. If the unit time is not seconds, the amount of accessed data per unit time is converted into the amount of accessed data within 1 second, which serves as the bandwidth information for the first device 30 to access the first storage device 40. Since the access data volume of time windows closer to the current moment is closer to the bandwidth at the current moment, determining the weight of each time window through the temporal relationship of the time windows can increase the contribution of the access data volume of time windows close to the current moment to the bandwidth information at the current moment, and reduce the contribution of the access data volume of time windows far from the current moment to the bandwidth information at the current moment, thereby further improving the effectiveness of the determined bandwidth information.

[0056] The embodiments of the present disclosure effectively determine the bandwidth information of the first device by sampling the access data volume of the first device at intervals, combining the sampling duration and the number of sampling times, and providing an effective bandwidth information reference for determining whether to limit the flow of the first device.

[0057] In some optional embodiments, based on any of the above embodiments, the bandwidth information includes an average bandwidth value; and the flow control module 22 is configured to determine the flow limiting state based on a preconfigured bandwidth threshold and the average bandwidth value.

[0058] Among them, the average bandwidth value is the average bandwidth of the first device 30 determined based on interval sampling, that is, for the current moment, the average value of the historical actual access bandwidth is used as the bandwidth information at the current moment, which is used to determine the current limiting state of the first device 30 at the current moment. The preconfigured bandwidth threshold (or bandwidth waterline) is a bandwidth threshold set in advance for the first device 30 based on the access service quality requirements of each device to the first storage 40 in the application scenario. When the bandwidth information of the first device 30 exceeds the bandwidth threshold, the flow control module 22 needs to limit the flow of the first device 30. When the bandwidth information of the first device 30 is less than the bandwidth threshold, the flow control module 22 may not limit the flow of the first device 30. Based on this, the flow control module 22 can compare the average bandwidth value in the bandwidth information with the bandwidth threshold, and determine the current limiting state of the first device 30 according to the comparison result. For example, if the average bandwidth value is greater than the bandwidth threshold, the current limiting state is determined to be the first state (i.e., bandwidth current limiting state); if the average bandwidth value is less than or equal to the bandwidth threshold, the current limiting state is determined to be the second state (i.e., bandwidth non-current limiting state).

[0059] In the embodiments of the present disclosure, by configuring a bandwidth threshold as a reference bandwidth for determining a current limiting state, it is convenient to compare the average bandwidth value of the first device with the bandwidth threshold, thereby effectively determining the current limiting state and providing an effective current limiting state for bandwidth control of the first device.

[0060] Figure 3 It is a structural diagram of a memory access bandwidth limiting device provided by another exemplary embodiment of the present disclosure.

[0061] In some optional embodiments, the flow control module 22 may include: a comparator 221 configured to compare the average bandwidth value with a bandwidth threshold, and determine a flow limiting state based on the comparison result.

[0062] In some optional embodiments, the comparator 221 may be implemented using any implementable logic circuit, which is not limited in the embodiments of the present disclosure.

[0063] In some optional embodiments, the flow control module 22 may further include one or more registers, and the bandwidth threshold value may be stored through the registers, and the average bandwidth value may be cached through the registers. The bandwidth threshold value is input into one input end of the comparator 221, and the average bandwidth value is input into the other input end of the comparator 221. The comparator 221 compares the bandwidth threshold value with the average bandwidth value and outputs the comparison result at the output end of the comparator 221. Different comparison results can represent different current limiting states. For example, if the comparator 221 outputs 1, it indicates that the average bandwidth value is greater than the bandwidth threshold value, and the current limiting state is determined to be the first state. If the comparator 221 outputs 0, it indicates that the average bandwidth value is less than or equal to the bandwidth threshold value, and the current limiting state is determined to be the second state.

[0064] In the embodiments of the present disclosure, the average bandwidth value is compared with the bandwidth threshold by a comparator, and the current limiting state is effectively determined while ensuring real-time performance.

[0065] In some optional embodiments, based on any of the above embodiments, the bandwidth control information includes a first bandwidth control threshold.

[0066] In some optional embodiments, the flow control module 22 is configured to:

[0067] In the first working mode, in response to the current limiting state being the first state, the current bandwidth of the first device 30 accessing the first memory 40 is controlled based on the first bandwidth speed control threshold; or, in response to the current limiting state being the second state, the first preset bandwidth of the first device 30 is determined as the current bandwidth of the first device 30.

[0068] The first bandwidth control threshold (or maximum bandwidth control waterline) is used by the flow control module 22 to control the lower limit of the access bandwidth of the first device 30. That is, the first bandwidth control threshold can represent the minimum access bandwidth of the first device 40 in the first state. The first operating mode refers to the operating mode when the bandwidth threshold is large. The first preset bandwidth is the preset bandwidth corresponding to the first device 30, that is, the access bandwidth supported by the first device 30 when the first device 30 is not subject to any flow restriction.

[0069] In some optional embodiments, the first state of the current limiting state indicates that the first device 30 currently needs to be current limited. Based on the first bandwidth control threshold, the current bandwidth of the first device 30 accessing the first storage 40 is controlled so that the first device 30 can access the first storage 40 according to the current bandwidth at the current moment. For example, the first bandwidth control threshold is used as the current bandwidth of the first device 30, and the sending rate of access commands of the first device 30 is controlled according to the first bandwidth control threshold, so that the first device 30 can retain a certain access capability and avoid complete blocking.

[0070] In some optional embodiments, the first bandwidth control threshold is smaller than the bandwidth threshold and larger than a second preset bandwidth. The second preset bandwidth is 0 or a value close to 0.

[0071] In some optional embodiments, the current limiting state is the second state, indicating that there is currently no need to limit the current of the first device 30. The first preset bandwidth of the first device 30 can be determined as the current bandwidth of the first device 30, so that the first device 30 can access the first memory 40 according to its original bandwidth, that is, the traffic control module forwards the access command of the first device 30 to the on-chip network or the first memory 40 in real time to ensure the access service quality of the first device 30.

[0072] In an embodiment of the present disclosure, when the bandwidth threshold is large, the flow control module is in the first working mode and can control the lower limit value of the access bandwidth of the first device to the first memory based on the first bandwidth speed control threshold, thereby avoiding the lower limit value of the access bandwidth of the first device being 0 under the current limiting condition, thereby avoiding large jitter of the access bandwidth of the first device between the larger first preset bandwidth and 0, and improving the stability of the access bandwidth of the first device.

[0073] In some optional embodiments, based on any of the above embodiments, the bandwidth control information includes a first time interval; and the flow control module 22 is configured to:

[0074] In the first operating mode, in response to the current limiting state being the first state, the access command of the first device 30 is sent to the first memory 40 at a first time interval to control the current bandwidth of the first device 30 .

[0075] The first time interval is used by the flow control module 22 to control the sending rate of the access command of the first device 30. The access command of the first device 30 is an access command for the first device 30 to access the first memory 40. The access command may include at least one of a read command and a write command.

[0076] In some optional embodiments, the first time interval has a similar purpose to the first bandwidth control threshold described above, both of which are used by the flow control module 22 to control the first device 30 to maintain a certain access capability under the current limiting condition (i.e., the current limiting state is the first state), thereby preventing the current bandwidth from being zero, i.e., preventing complete blocking of the first device 30. The difference is that in this embodiment, the current bandwidth of the first device 30 is controlled by controlling the first device 30 to send access commands according to the first time interval. For example, when the first device 30 has one or more access commands to be sent, these access commands are arranged in a certain time sequence, with one access command sent at time T0 and another access command sent at time T1 after the first time interval. In this way, by evenly distributing the access commands over time, a large number of concentrated transmissions is avoided, and complete blocking of the first device 30's access to the first memory 40 is avoided. Thus, on the basis of effective current limiting, large jitter in the access bandwidth of the first device 30 can be avoided, thereby improving the stability of the access bandwidth of the first device 30.

[0077] In some optional embodiments, a mapping relationship exists between the first time interval and the first bandwidth control threshold described above. The first time interval can be pre-determined based on the first bandwidth control threshold and the mapping relationship. For example, the first bandwidth control threshold represents the minimum access bandwidth of the first device 30 under current limiting conditions, i.e., the amount of access data per second. The amount of access data per second can be calculated by sending access commands according to the first time interval. By making the amount of access data per second corresponding to sending access commands at the first time interval equal to the first bandwidth control threshold, and combining the amount of access data corresponding to each access command, the first time interval and the number of access commands sent each time can be determined.

[0078] In some optional embodiments, in the first working mode, the flow control module 22 determines the first preset bandwidth of the first device 30 as the current bandwidth of the first device 30 in response to the current limiting state being the second state. For details, please refer to the above embodiment.

[0079] In some optional embodiments, the user of the memory access bandwidth limiting device 20 may choose whether to enable the first working mode based on the size of the bandwidth threshold of the device in the usage scenario. For example, the user may configure whether to enable the first working mode through an application. That is to say, the memory access bandwidth limiting device 20 of the embodiment of the present disclosure may support a first working mode that controls the bandwidth of the device based on bandwidth speed control information, and may also support a preset working mode that does not rely on bandwidth speed control information. The user may enable the first working mode or the preset working mode through the application configuration according to the specific circumstances of the corresponding device. The preset working mode is that in the case of current limiting, the access of the first device 30 to the first memory 40 is completely blocked, and in the case of non-current limiting, the first device 30 is controlled to access the first memory 40 according to the original bandwidth of the first device 30.

[0080] In an embodiment of the present disclosure, by configuring a first time interval, when the current limiting state of the first device is a bandwidth current limiting state, the access command of the first device is sent to the first memory according to the first time interval, so that multiple access commands of the first device can be sent in a dispersed manner, avoiding concentrated and large-scale sending, and also avoiding complete blocking of the first device's access to the first memory. On the basis of ensuring current limiting of the first device, large jitter of the access bandwidth of the first device between the original bandwidth and 0 can be avoided, and the overall average bandwidth of the first device can be ensured to fluctuate within a certain bandwidth range near the bandwidth threshold, thereby improving the stability of the access bandwidth of the first device.

[0081] In some optional embodiments, based on any of the above embodiments, the bandwidth control information includes a second bandwidth control threshold.

[0082] In some optional embodiments, the traffic control module 22 is configured to: in the second working mode, in response to the current limiting state being the first state, block the access command of the first device 30; or, in response to the current limiting state being the second state, control the current bandwidth of the first device 30 based on the second bandwidth control threshold.

[0083] Among them, the second bandwidth speed control threshold (or it can be called the small bandwidth speed control waterline) represents the upper limit of the access bandwidth of the first device 30 under the unlimited flow condition (that is, the flow limiting state is the second state), that is, the maximum access bandwidth under the unlimited flow condition, and the second working mode refers to the working mode under the condition of a smaller bandwidth threshold. In the second working mode, due to the smaller bandwidth threshold, if the flow limiting state of the first device 30 is the first state (that is, the bandwidth limiting state), the flow control module 22 can block the access command of the first device, that is, the flow control module 22 temporarily does not send (that is, forward) the access command of the first device 30, that is, controls the current bandwidth of the first device 30 to be the second preset bandwidth (for example, 0 or a bandwidth value close to 0). If the flow limiting state of the first device 30 is the second state (i.e., the bandwidth is not limited state), the flow control module 22 can control the current bandwidth of the first device 30 based on the second bandwidth speed control threshold. For example, the flow control module 22 uses the second bandwidth speed control threshold as the current bandwidth of the first device 30, and forwards the access command of the first device 30 to the first memory 40 according to the forwarding rate corresponding to the second bandwidth speed control threshold, or forwards it to the first memory 40 through the on-chip network.

[0084] In some optional embodiments, the second bandwidth control threshold is less than the first preset bandwidth of the first device 30 and greater than the bandwidth threshold. In the absence of flow restriction, the flow control module 22 controls the current bandwidth of the first device 30 accessing the first storage 40 to be less than the first preset bandwidth, thereby preventing the average bandwidth of the first device 30 accessing the first storage 40 from exceeding the bandwidth threshold, thereby ensuring the flow restriction effect of the first device 30.

[0085] In some optional embodiments, based on any of the above embodiments, the bandwidth control information includes a second time interval.

[0086] In some optional embodiments, the flow control module 22 is configured to: in the second working mode, in response to the current limiting state being the second state, send the access command of the first device 30 to the first memory at a second time interval to control the current bandwidth of the first device.

[0087] Among them, the purpose of the second time interval is consistent with that of the above-mentioned second bandwidth speed control threshold, and both are used as the upper limit value for the flow control module 22 to control the access bandwidth of the first device 30. The difference between the second time interval and the second bandwidth speed control threshold is that the flow control module 22 sends the access command of the first device 30 according to the second time interval, so that multiple access commands can be sent to the first memory 40 relatively evenly and dispersedly, avoiding the concentrated sending of a large number of access commands. In this way, when the monitor 21 determines the bandwidth information corresponding to the first device 30 through interval sampling, it can avoid the occurrence of situations such as low accuracy of bandwidth information due to the concentrated sending period not being sampled or the concentrated sending period being sampled multiple times, thereby further improving the effectiveness of the bandwidth information determined by the monitor 21 through sampling, and then ensuring that the average bandwidth of the first device 30 accessing the first memory 40 fluctuates within a certain bandwidth range near the bandwidth threshold, avoiding the situation where the average bandwidth is higher than the bandwidth threshold, and ensuring the current limiting effect on the first device 30.

[0088] In some optional embodiments, there is a certain mapping relationship between the second time interval and the above-mentioned second bandwidth control threshold. The second time interval can be determined in advance based on the second bandwidth control threshold and the mapping relationship. The specific principle can be referred to the first time interval and the first bandwidth control threshold in the above-mentioned embodiment, and will not be repeated here.

[0089] In some optional embodiments, in the second operating mode, in response to the current limiting state being the first state, an access command of the first device 30 is blocked.

[0090] In some optional embodiments, the user of the memory access bandwidth limiting device 20 can configure whether to enable the second working mode according to the size of the bandwidth threshold of the device in the usage scenario. For example, the user can configure whether to enable the second working mode through an application. That is to say, the memory access bandwidth limiting device 20 of the embodiment of the present disclosure can support a second working mode that controls the bandwidth of the device based on bandwidth speed control information, and can also support a preset working mode that does not rely on bandwidth speed control information. The user can configure to enable the second working mode or the preset working mode according to the specific situation of the corresponding device. The preset working mode means that under the current limiting condition, the memory access bandwidth limiting device 20 completely blocks the first device 30 from accessing the first memory 40. Under the non-current limiting condition, the memory access bandwidth limiting device 20 controls the first device 30 to access the first memory 40 according to the original bandwidth of the first device 30.

[0091] In an embodiment of the present disclosure, by configuring a second time interval, when the current limiting state of the first device is the bandwidth unlimited state, the access command of the first device is sent to the first memory according to the second time interval, so that the access command of the first device can be sent evenly and dispersedly, avoiding concentrated and large-scale sending. On the one hand, the maximum access bandwidth of the first device accessing the first memory can be reduced, that is, the maximum access bandwidth of the first device accessing the first memory is changed from the original bandwidth of the first device to the second bandwidth control threshold, reducing the gap between the maximum access bandwidth and the smaller bandwidth threshold. On the other hand, the validity of the bandwidth information of the first device determined by the monitor can be improved, so that the average bandwidth of the first device accessing the first memory can fluctuate within a certain bandwidth range near the bandwidth threshold, avoiding the average bandwidth of the first device accessing the first memory being higher than the bandwidth threshold, and ensuring the current limiting effect on the first device.

[0092] In some optional embodiments, the memory access bandwidth limiting device 20 or the flow control module 22 of the embodiment of the present disclosure can also simultaneously support the limiting functions of the above-mentioned first working mode and the second working mode. The user can configure to open the first working mode or the second working mode according to the bandwidth threshold of the corresponding device, or can only use the preset working mode.

[0093] In some optional embodiments, based on any of the above embodiments, the flow control module 22 is further configured to:

[0094] In the preset working mode, in response to the current limiting state being the first state, the access command of the first device 30 is blocked; or, in response to the current limiting state being the second state, the first preset bandwidth of the first device 30 is determined as the current bandwidth of the first device 30.

[0095] Among them, the preset working mode refers to the situation where the bandwidth threshold is within a certain threshold range, that is, there is no situation where the bandwidth threshold is very large or very small. In this case, if the current limiting state is the first state (that is, the bandwidth current limiting state), the flow control module 22 can block the access command of the first device 30. If the current limiting state is the second state (that is, the bandwidth non-current limiting state), the flow control module 22 can determine the first preset bandwidth of the first device 30 (that is, the original bandwidth of the first device 30) as the current bandwidth of the first device 30, that is, forward the access command of the first device 30 to the first memory 40 according to the first preset bandwidth, or forward it to the first memory 40 through the on-chip network.

[0096] In some optional embodiments, the bandwidth thresholds corresponding to different devices may be the same or different, and may be set specifically according to the access service requirements of the devices.

[0097] In the embodiments of the present disclosure, based on the first working mode and / or the second working mode, the flow control module 22 or the memory access bandwidth limiting device 20 can also support a preset working mode, which can improve the versatility of the device of the embodiments of the present disclosure and meet the user's flow limiting requirements for different devices.

[0098] In some optional embodiments, based on any of the above embodiments, the flow control module 22 is further configured to:

[0099] In the preset working mode, the system switches from the preset working mode to the first working mode in response to the first enable signal; or switches from the preset working mode to the second working mode in response to the second enable signal.

[0100] Among them, the preset working mode refers to the working mode in which the bandwidth threshold is within the preset range. That is, if there is no situation where the bandwidth threshold is very large, and there is no situation where the bandwidth threshold is very small, the flow control module 22 can work in the preset working mode, or the default working mode of the flow control module 22 is the preset working mode. For example, when the device 20 is started, the flow control module 22 enters the preset working mode by default. The first enable signal is a control signal for enabling (or opening) the first working mode, and the second enable signal is a control signal for enabling (or opening) the second working mode. In the preset working mode, if the flow control module 22 receives the first enable signal, indicating that the first working mode needs to be opened, the flow control module 22 can switch from the preset working mode to the first working mode. For example, the flow control module 22 can switch the signal state of the enable end of the preset working mode from an enabled state to a non-enabled state, and provide the first enable signal to the enable end of the first working mode to achieve switching from the preset working mode to the first working mode. The specific switching method is not limited. In the preset working mode, if the flow control module 22 receives a second enable signal, indicating that the second working mode needs to be turned on, the flow control module 22 can switch from the preset working mode to the second working mode. The switching principle is similar to that of the first working mode and will not be repeated here.

[0101] In some optional embodiments, the first enable signal and the second enable signal can be issued by the user through software control. For example, when the user needs to use the device 20 to limit the current of a device with a very large bandwidth threshold, the software can be used to control the device 20 to switch from the preset operating mode to the first operating mode. When the user needs to use the device 20 to limit the current of a device with a very small bandwidth threshold, the software can be used to control the device 20 to switch from the preset operating mode to the second operating mode. When the user needs to use the device 20 to limit the current of a device with a bandwidth threshold within a preset range, the preset operating mode of the device 20 can be used without controlling the first enable signal and the second enable signal.

[0102] In some optional embodiments, corresponding hardware triggering methods can be set for the preset operating mode, the first operating mode, and the second operating mode. For example, the device 20 can include an external selection interface corresponding to each operating mode, and the user can connect the corresponding control button through the external selection interface to select the operating mode through the control button. The control button can include physical buttons and virtual buttons, etc., which are not specifically limited.

[0103] In some optional embodiments, the user may further configure, through software, the bandwidth control information corresponding to the first operating mode (e.g., a first bandwidth control threshold or a first time interval) and other relevant information related to the first operating mode; and / or, through software, the bandwidth control information corresponding to the second operating mode (e.g., a second bandwidth control threshold or a second time interval) and other relevant information related to the second operating mode. For example, the relevant information may be written into a relevant register in the device 20 or the flow control module 22 through software, so that the device 20 or the flow control module 22 can read the relevant information from the register for use in the current limiting function of the corresponding operating mode.

[0104] In the embodiments of the present disclosure, the flow control module can support a preset working mode, a first working mode, and a second working mode, and can enable the first working mode through a first enable signal and enable the second working mode through a second enable signal, thereby meeting the user's flow limiting requirements for devices with different bandwidth thresholds, ensuring the flow limiting effect of the overall access system, and improving the versatility of the device.

[0105] Figure 4 This is a schematic diagram of the principle of bandwidth limiting based on bandwidth threshold in related technologies. Figure 4As shown, assuming that the device to be limited is device A, from time t1 to time t2, the bandwidth limiter of the related art determines based on the interval sampling method that the average bandwidth value of device A accessing the memory is lower than or equal to the bandwidth threshold, and there is no need to limit the flow of device A. The instantaneous access bandwidth (i.e., instantaneous bandwidth) of device A accessing the memory from time t1 to time t2 is the original bandwidth of device A (i.e., the first preset bandwidth). From time t2 to time t3, the bandwidth limiter determines that the average bandwidth value of device A accessing the memory is higher than the bandwidth threshold, and it is necessary to limit the flow of device A. The corresponding instantaneous bandwidth of device A (i.e., the instantaneous bandwidth of device A accessing the memory, also called the instantaneous bandwidth of device A) is 0, that is, device A is prohibited from accessing the memory from time t2 to time t3. From time t3 to time t4, the average bandwidth value determined by the bandwidth limiter is lower than or equal to the bandwidth threshold again, and the instantaneous bandwidth of device A accessing the memory from time t3 to time t4 is the original bandwidth of the device. From t4 to t5, the instantaneous bandwidth of device A accessing the storage is 0, and so on. As time goes by, the bandwidth of device A is limited. There is a certain deviation between the actual average bandwidth in the figure and the statistical average bandwidth value. Taking the current moment as an example, since the statistical average bandwidth value at the current moment is obtained based on the amount of access data in multiple historical time windows, there is a time interval between the time windows, so the determined average bandwidth value has a certain lag. For example, Figure 4 In the example, before time t2, the actual average bandwidth is higher than the bandwidth threshold, but the average bandwidth value determined by sampling is still lower than the bandwidth threshold, so that the instantaneous bandwidth corresponding to device A during this period is still the original bandwidth corresponding to device A. Based on this, the actual average bandwidth fluctuates within a certain range (or jitter). If the bandwidth threshold is within the appropriate range, the average bandwidth of device A will fluctuate around the bandwidth threshold (e.g. Figure 4 shown).

[0106] Figure 5 This is a schematic diagram of the principle of bandwidth limiting when the bandwidth threshold is large, such as Figure 5 As shown, in Figure 4 Based on the current limiting principle shown above, if the bandwidth threshold is very large and the original bandwidth corresponding to device A is also very large, the instantaneous bandwidth of device A will experience relatively large jitter. Figure 5In the example, between t1 and t2, and between t3 and t4, access commands from device A are continuously sent in large numbers according to its original bandwidth, causing the statistical average bandwidth value to quickly exceed the bandwidth threshold, entering the bandwidth limiting phase. However, between t2 and t3, and between t4 and t5, the average bandwidth value determined based on sampling is affected by the amount of access data between t1 and t2, causing access to device A to be blocked for a long time and completely stagnant. Thus, device A's instantaneous bandwidth constantly switches between extremely high and almost zero. This extreme access behavior is not friendly to the overall memory access system and may even cause performance loss.

[0107] Figure 6 This is a schematic diagram of the principle of bandwidth limiting when the bandwidth threshold is small, such as Figure 6 As shown, in Figure 4 Based on the principle shown, if the bandwidth threshold corresponding to device A is very small, the actual average bandwidth of device A's access may be higher than the expected bandwidth threshold, and the bandwidth limitation effect may not be achieved. Figure 6 In the example, from t1 to t2 and from t3 to t4, device A's access commands are not restricted and are continuously sent in large quantities according to its original bandwidth. However, from t2 to t3 and from t4 to t5, due to the smaller bandwidth threshold, the gap between device A's original bandwidth and the bandwidth threshold is large. Despite a period of throttling, device A's actual average bandwidth remains above the bandwidth threshold. For example, at t3, because the sampling time window has been updated, the average bandwidth value determined by the sampled access data volume may only include the actual access bandwidth from t2 to t3. Or, most of the time window may be from t2 to t3, while the access data volume in the time window from t2 to t3 is zero. As a result, the sampled average bandwidth value is already below the bandwidth threshold, and throttling is no longer performed on device A. As a result, the actual average bandwidth of device A exceeds the expected bandwidth threshold, failing to achieve the desired throttling effect.

[0108] To address the above issues, the memory access bandwidth limiting apparatus 20 of the embodiment of the present disclosure can control the average bandwidth (ie, actual average bandwidth) of the first device 30 to fluctuate within a certain bandwidth range near a bandwidth threshold through bandwidth control information.

[0109] For example, Figure 7 This is a schematic diagram of the current limiting principle when the bandwidth threshold is large provided by an exemplary embodiment of the present disclosure. Figure 7As shown, the bandwidth control information takes the first bandwidth control threshold as an example. From time t1 to time t2, and from time t3 to time t4, the average bandwidth value determined by the monitor 21 through sampling is lower than the bandwidth threshold, and the original bandwidth of the first device 30 (i.e., the first preset bandwidth) is determined as the current bandwidth of the first device 30 (i.e., the instantaneous bandwidth). From time t2 to time t3, and from time t4 to time t5, the average bandwidth value determined by the monitor 21 through sampling is higher than the bandwidth threshold. It is necessary to limit the flow of the first device 30, and the first bandwidth control threshold is determined as the current bandwidth of the first device 30, so that the first device 30 can retain a certain access capability, avoiding completely blocking the first device 30 from accessing the first memory 40, thereby avoiding the access bandwidth of the first device 30 from cyclically switching between the larger original bandwidth and 0 (or close to 0), and avoiding large jitter in the instantaneous bandwidth of the first device 30.

[0110] For another example, Figure 8 FIG. 1 is a schematic diagram of a current limiting principle when the bandwidth threshold is small provided by an exemplary embodiment of the present disclosure. Figure 8 As shown, the bandwidth control information takes the second bandwidth control threshold as an example. When the average bandwidth value determined based on sampling is less than or equal to the bandwidth threshold, for example, from time t1 to time t2, and from time t3 to time t4, the second bandwidth control threshold is determined to be the current bandwidth (i.e., instantaneous bandwidth) of the first device 30. Access commands from the first device 30 are then sent to the first memory 40 based on the current bandwidth. When the average bandwidth value determined based on sampling is higher than the bandwidth threshold, for example, from time t2 to time t3, and from time t4 to time t5, access commands from the first device 30 are blocked, i.e., the current bandwidth of the first device 30 is set to 0. In this way, the actual average bandwidth of the first device 30 can be controlled within a certain range near the bandwidth threshold, ensuring the current limiting effect on the first device 30 and avoiding the situation where the actual average bandwidth exceeds the bandwidth threshold when the bandwidth threshold is small.

[0111] It should be noted that Figure 7 and Figure 8 The actual average bandwidth in the figure is only illustrated as a broken line. In actual applications, the actual average bandwidth of the device can be a curve, such as Figure 4 shown.

[0112] The memory access bandwidth current limiting device 20 provided in the embodiment of the present disclosure, by introducing a large bandwidth speed control waterline (i.e., a first bandwidth speed control threshold), can optimize the access bandwidth of the first device 30 (i.e., the bandwidth of the first device 30 accessing the first memory 40) when the bandwidth threshold is very large, thereby avoiding large jitter in the access bandwidth of the first device 30. By introducing a small bandwidth speed control waterline (i.e., a second bandwidth speed control threshold), the access bandwidth of the first device 30 is optimized, ensuring that the average bandwidth presented by the first device 30 achieves the expected current limiting effect, thereby effectively improving the performance of the memory access system and the memory access service quality.

[0113] The collection, storage, use, processing, transmission, provision, and disclosure of user personal information in the technical solutions disclosed herein comply with relevant laws and regulations and do not violate public order and good morals. Furthermore, the collection and use of user personal information in the technical solutions disclosed herein are conducted with the user's knowledge and authorization, and do not involve any unauthorized collection or use of user personal information.

[0114] The above-mentioned embodiments of the present disclosure may be implemented individually or in any combination without conflict. The specific configuration may be based on actual needs and is not limited by the present disclosure.

[0115] Exemplary Methods

[0116] Figure 9 FIG. 1 is a flow chart of a method for limiting memory access bandwidth provided by an exemplary embodiment of the present disclosure. The method of this embodiment can be implemented by a corresponding device embodiment of the present disclosure, such as Figure 9 As shown, the method of the embodiment of the present disclosure may include:

[0117] Step 510: Monitor bandwidth information of a first device accessing a first memory.

[0118] Step 520: Determine the current limiting state based on the bandwidth information.

[0119] Step 530: Based on the current limiting state and the bandwidth control information, control the current bandwidth of the first device accessing the first memory.

[0120] Figure 10 It is a flowchart of a memory access bandwidth limiting method provided by another exemplary embodiment of the present disclosure.

[0121] In some optional embodiments, in the above Figure 9 Based on the embodiment shown, Figure 10 As shown, monitoring bandwidth information of the first device accessing the first memory in step 510 may include:

[0122] Step 5110: Sample the amount of access data from the first device to the first memory within a specified time period at a preset time interval.

[0123] Step 5120: Determine bandwidth information based on the amount of access data sampled multiple times, the specified duration, and the number of sampling times.

[0124] In some optional embodiments, based on any of the above embodiments, the bandwidth information includes an average bandwidth value.

[0125] like Figure 10 As shown, determining the current limiting state based on the bandwidth information in step 520 may include:

[0126] Step 5210: Determine the current limiting state based on the preconfigured bandwidth threshold and the average bandwidth value.

[0127] In some optional embodiments, determining the current limiting state based on a preconfigured bandwidth threshold and an average bandwidth value in step 5210 may include comparing the average bandwidth value with the bandwidth threshold, and determining the current limiting state based on the comparison result.

[0128] Figure 11 4 is a flow chart of a memory access bandwidth limiting method provided by another exemplary embodiment of the present disclosure.

[0129] In some optional embodiments, based on any of the above embodiments, the bandwidth control information includes a first bandwidth control threshold.

[0130] In some optional embodiments, such as Figure 11 As shown, step 530 of controlling the current bandwidth of the first device accessing the first memory based on the current limiting state and the bandwidth control information may include:

[0131] Step 5310: In the first working mode, in response to the current limiting state being the first state, the current bandwidth of the first device accessing the first memory is controlled based on the first bandwidth speed control threshold.

[0132] Step 5320: In the first working mode, in response to the current limiting state being the second state, determine the first preset bandwidth of the first device as the current bandwidth of the first device.

[0133] In some optional embodiments, based on any of the above embodiments, the bandwidth control information includes a first time interval.

[0134] In some optional embodiments, step 530 of controlling the current bandwidth of the first device accessing the first memory based on the current limiting state and the bandwidth control information may include: in the first operating mode, in response to the current limiting state being the first state, sending the access command of the first device to the first memory at a first time interval to control the current bandwidth of the first device.

[0135] Figure 12 It is a flowchart of a memory access bandwidth limiting method provided by another exemplary embodiment of the present disclosure.

[0136] In some optional embodiments, based on any of the above embodiments, the bandwidth control information includes a second bandwidth control threshold.

[0137] In some optional embodiments, such as Figure 12 As shown, step 530 of controlling the current bandwidth of the first device accessing the first memory based on the current limiting state and the bandwidth control information may include:

[0138] Step 5301: In the second working mode, in response to the current limiting state being the first state, blocking an access command of the first device.

[0139] Step 5302: In the second working mode, in response to the current limiting state being the second state, the current bandwidth of the first device is controlled based on the second bandwidth speed control threshold.

[0140] In some optional embodiments, based on any of the above embodiments, the bandwidth control information includes a second time interval.

[0141] In some optional embodiments, step 530 of controlling the current bandwidth of the first device accessing the first memory based on the current limiting state and the bandwidth control information may include: in the second operating mode, in response to the current limiting state being the second state, sending the access command of the first device to the first memory at a second time interval to control the current bandwidth of the first device.

[0142] Figure 13 4 is a flow chart of a memory access bandwidth limiting method provided by another exemplary embodiment of the present disclosure.

[0143] In some optional embodiments, based on any of the above embodiments, Figure 13 As shown, the method of the embodiment of the present disclosure also includes:

[0144] Step 610: In the preset working mode, in response to the current limiting state being the first state, blocking the access command of the first device; or, in response to the current limiting state being the second state, determining the first preset bandwidth of the first device as the current bandwidth of the first device.

[0145] Figure 14 It is a flowchart of a memory access bandwidth limiting method provided by another exemplary embodiment of the present disclosure.

[0146] In some optional embodiments, based on any of the above embodiments, Figure 14 As shown, the method of the embodiment of the present disclosure may further include:

[0147] Step 710: In the preset working mode, in response to a first enable signal, switch from the preset working mode to the first working mode; or, in response to a second enable signal, switch from the preset working mode to the second working mode.

[0148] The above-mentioned embodiments of the present disclosure may be implemented individually or in any combination without conflict. The specific configuration may be based on actual needs and is not limited by the present disclosure.

[0149] Any of the memory access bandwidth limiting methods provided in the embodiments of the present disclosure can be executed by any appropriate electronic device with data processing capabilities, including but not limited to electronic devices such as terminal devices and servers. Alternatively, any of the memory access bandwidth limiting methods provided in the embodiments of the present disclosure can be executed by a processor, such as by invoking corresponding instructions stored in a memory to execute any of the memory access bandwidth limiting methods mentioned in the embodiments of the present disclosure. This will not be further described below.

[0150] The beneficial technical effects corresponding to the exemplary embodiment of this method can be found in the corresponding beneficial technical effects of the above exemplary device part, which will not be repeated here.

[0151] Exemplary electronic devices

[0152] Figure 15 is a structural diagram of an electronic device provided by an embodiment of the present disclosure, including at least one processor 91 and a memory 92.

[0153] The processor 91 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 90 to perform desired functions.

[0154] The memory 92 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory. Non-volatile memory may include, for example, read-only memory (ROM), a hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 91 may execute the one or more computer program instructions to implement the methods and / or other desired functions of the various embodiments of the present disclosure described above.

[0155] In one example, the electronic device 90 may further include an input device 93 and an output device 94 , and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown).

[0156] The input device 93 may also include, for example, a touch screen, a microphone, various sensors, and the like. Sensors may include, for example, image sensors (e.g., cameras, etc.), laser radars, millimeter-wave radars, ultrasonic radars, positioning sensors, pressure sensors, air quality sensors, temperature sensors, and the like. Image sensors, laser radars, millimeter-wave radars, ultrasonic radars, and the like may be used to perceive the surrounding environment, i.e., to detect dynamic and static objects in the surrounding environment. Dynamic and static objects may include, for example, static objects such as lane lines, curbs, arrows, signs, trees, and buildings, as well as dynamic objects such as surrounding vehicles, pedestrians, and cyclists. Positioning sensors are used to locate the movable device (e.g., a vehicle, robot, etc.) in which the electronic device is located. Positioning sensors may include, for example, an inertial measurement unit (IMU), a global positioning system (GPS), and the like. Pressure sensors may be used to detect seat pressure. Temperature sensors may be used to detect the temperature in the vehicle cabin. Air quality sensors may be used to detect the air quality in the vehicle cabin.

[0157] The output device 94 can output various information to the outside, and may include, for example, a display, a speaker, a communication network and a remote output device connected thereto, and the like.

[0158] Of course, to simplify, Figure 15 Only some of the components related to the present disclosure in the electronic device 90 are shown, and components such as buses, input / output interfaces, etc. are omitted. In addition, the electronic device 90 may further include any other appropriate components according to specific application scenarios.

[0159] The embodiment of the present disclosure further provides a chip, which may include: the memory access bandwidth limiting device 20 provided in any of the above embodiments of the present disclosure, which can be found in Figure 1 .

[0160] In some optional embodiments, such as Figure 1 As shown, the chip may further include a memory 15, an on-chip network 14, at least one device capable of accessing the memory, and other related components, such as device 11, device 12, and device 13. Each device requiring current limiting may correspond to a memory access bandwidth current limiting device 20.

[0161] Exemplary computer program products and computer-readable storage media

[0162] In addition to the above methods and devices, embodiments of the present disclosure may also provide a computer program product, including computer program instructions, which, when executed by a processor, enable the processor to perform the steps in the methods of various embodiments of the present disclosure described in the above "Exemplary Method" section.

[0163] The computer program product may be written in any combination of one or more programming languages to implement the operations of the disclosed embodiments, including object-oriented programming languages such as Java, C++, and conventional procedural programming languages such as C or similar programming languages. The program code may be executed entirely on the user's computing device, partially on the user's computing device, as a stand-alone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0164] In addition, an embodiment of the present disclosure may also be a computer-readable storage medium having computer program instructions stored thereon. When the computer program instructions are executed by a processor, the processor executes the steps in the method of various embodiments of the present disclosure described in the above “Exemplary Method” section.

[0165] Computer readable storage media can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium is, for example, but not limited to, a system, device or component comprising electricity, magnetism, light, electromagnetic, infrared, or semiconductor, 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), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0166] The basic principles of the present disclosure have been described above in conjunction with specific embodiments. However, the advantages, strengths, and effects mentioned in this disclosure are merely illustrative and not restrictive, and should not be considered as essential to each embodiment of the present disclosure. Furthermore, the specific details disclosed above are provided for illustrative purposes and to facilitate understanding, rather than as limitations. These details do not limit the present disclosure to necessarily being implemented using these specific details.

[0167] Those skilled in the art may make various changes and modifications to the present disclosure without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present disclosure and their equivalents, the present disclosure is intended to include these modifications and variations.

Claims

1. A memory access bandwidth current limiting device, comprising: a monitor configured to monitor bandwidth information of access from the first device to the first memory; The flow control module is configured as follows: Determining a current limiting state based on the bandwidth information; Based on the current limiting state and the bandwidth speed control information, a current bandwidth of the first device accessing the first memory is controlled.

2. The device according to claim 1, wherein The bandwidth control information includes a first bandwidth control threshold; the traffic control module is configured to: In a first operating mode, in response to the current limiting state being the first state, controlling the current bandwidth of access by the first device to the first memory based on the first bandwidth speed control threshold; or, In response to the current limiting state being the second state, a first preset bandwidth of the first device is determined as the current bandwidth of the first device.

3. The device according to claim 1, wherein The bandwidth control information includes a first time interval; the traffic control module is configured to: In the first working mode, in response to the current limiting state being the first state, an access command of the first device is sent to the first memory at the first time interval to control the current bandwidth of the first device.

4. The device according to claim 1, wherein The bandwidth control information includes a second bandwidth control threshold; the traffic control module is configured to: In the second working mode, in response to the current limiting state being the first state, blocking an access command of the first device; In response to the current limiting state being the second state, the current bandwidth of the first device is controlled based on the second bandwidth rate control threshold.

5. The device according to claim 1, wherein The bandwidth control information includes a second time interval; The flow control module is configured to: In the second working mode, in response to the current limiting state being the second state, the access command of the first device is sent to the first memory at the second time interval to control the current bandwidth of the first device.

6. The device according to claim 1, wherein The bandwidth information includes an average bandwidth value; the flow control module is configured to: The current limiting state is determined based on a preconfigured bandwidth threshold and the average bandwidth value.

7. The device according to claim 6, wherein The flow control module includes: The comparator is configured to compare the average bandwidth value with the bandwidth threshold, and determine the current limiting state based on a comparison result.

8. The device according to any one of claims 1 to 7, wherein: The flow control module is further configured to: In a preset working mode, in response to the current limiting state being the first state, blocking access commands of the first device; or In response to the current limiting state being the second state, the first preset bandwidth of the first device is determined as the current bandwidth of the first device.

9. The device according to any one of claims 1 to 7, wherein: The flow control module is further configured to: In a preset working mode, in response to a first enable signal, switching from the preset working mode to the first working mode; or, In response to a second enable signal, the preset operating mode is switched to a second operating mode.

10. The device according to any one of claims 1 to 7, wherein: The monitor is configured to: sampling the amount of data accessed by the first device to the first memory within a specified time period at a preset time interval; The bandwidth information is determined based on the access data volume, the specified time duration, and the number of sampling times of multiple samples.

11. A method for limiting memory access bandwidth, comprising: monitoring bandwidth information of access from the first device to the first memory; Determining a current limiting state based on the bandwidth information; Based on the current limiting state and the bandwidth speed control information, a current bandwidth of the first device accessing the first memory is controlled.

12. A computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the method according to claim 11.

13. An electronic device, comprising: processor; a second memory for storing instructions executable by the processor; The processor is configured to read the executable instructions from the second memory and execute the instructions to implement the method according to claim 11.

14. A chip comprising: The device according to any one of claims 1 to 10.