A flow balancing control method and device

By allocating bandwidth on demand and allocating bandwidth according to actual capabilities, and dynamically adjusting node bandwidth, the bandwidth fluctuations and system delay problems caused by burst requests are solved, and adaptive equalization of traffic and bandwidth is achieved to avoid system congestion and deadlocks.

CN118590445BActive Publication Date: 2025-07-08WUXI STARS MICRO SYSTEM TECHNOLOGIES CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410627168.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-20
Publication Date
2025-07-08
Estimated Expiration
2044-05-20

AI Technical Summary

Technical Problem

The prior art cannot effectively solve the bandwidth fluctuations, performance imbalances and system delays caused by burst requests, and cannot adaptively adjust bandwidth allocation, resulting in system congestion and deadlock.

Method used

By allocating bandwidth on demand and allocating bandwidth according to actual capabilities, the node bandwidth is dynamically adjusted, and the adaptive equalization of traffic and bandwidth is achieved, and disorderly competition is converted into orderly competition, and bandwidth allocation is adjusted in real time using rate feedback signals.

Benefits of technology

Dynamic equalization and adaptive adjustment of bandwidth are achieved to avoid system congestion and deadlocks, ensure that requests are distributed balancedly according to actual capabilities, and reduce bandwidth fluctuations and delays.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118590445B_ABST
    Figure CN118590445B_ABST
Patent Text Reader

Abstract

The present application provides a traffic balance control method and device. External requests are received through the input ports of the device, and the size of the data packets corresponding to the requests is determined; the bandwidth allocated to the input ports is obtained, and based on the size of the data packets corresponding to the requests, the actual data bit width, and the bandwidth, the normalized transmission duration of the data packets corresponding to the requests is determined; based on the normalized transmission duration of the request data packets, the sending time corresponding to the next request is determined; the requests are allocated to the specified output ports according to the routes corresponding to the requests; at the output ports, the bandwidth allocated to the output ports is obtained according to the same principle, and based on the size of the data packets corresponding to the requests, the actual data bit width, and the system bandwidth, the normalized transmission duration of the data packets corresponding to the requests is determined; based on the normalized transmission duration of the request data packets, the sending time corresponding to the next request is determined. The present application reduces the problems of blocking, delay, bandwidth fluctuation, and bandwidth imbalance caused by disorderly competition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of network traffic control, and particularly relates to a method and device for device traffic control and balancing. Background Art

[0002] In the fields of computer networks, communication systems, and related engineering, traffic control and balancing technologies are used to effectively manage and optimize data transmission rates, prevent congestion, ensure the reasonable allocation of network resources, and the stable operation of the system. Its main purpose is to ensure that the sender does not send data to the receiver too quickly, preventing data loss or degradation of service quality due to the receiver's inability to process it in a timely manner, and to rationally maximize the use of system bandwidth and avoid large fluctuations in data services. Therefore, traffic control and balancing technologies are crucial both in the design of the chip and in the application of the system topology network outside the chip. Summary of the Invention

[0003] The purpose of this application is to provide a method and device for traffic control and balancing, aiming to solve the problems of bandwidth fluctuation, performance imbalance, and system latency through on-demand allocation and allocation according to actual capabilities.

[0004] According to the first aspect of this application, a traffic balancing control method is provided, including:

[0005] Receiving an external request through the input port of the device and determining the size of the request packet;

[0006] Obtaining the bandwidth and actual data bit width allocated to the input port, and determining the first normalized transmission duration of the packet corresponding to the request according to the size of the request packet, the actual data bit width, and the bandwidth;

[0007] Based on the first normalized transmission duration of the request packet, determining the sending time of the next request at the input port;

[0008] Allocating the request to the specified output port according to the route corresponding to the request;

[0009] Obtaining the bandwidth and actual data bit width allocated to the output port, and determining the second normalized transmission duration of the packet corresponding to the request according to the size of the request packet, the actual data bit width, and the bandwidth;

[0010] Based on the second normalized transmission duration of the request packet, determining the sending time of the next request at the output port.

[0011] In an alternative embodiment, the determining the sending time of the next request at the input port or the output port based on the normalized transmission duration of the request packet further includes:

[0012] When starting to send the request, start a timer. After the timer reaches the normalized transmission duration of the request data packet, start sending the next request.

[0013] In an optional embodiment, determining the sending time of the next request for the input port based on the first normalized transmission duration of the data packet corresponding to the request further includes:

[0014] When starting to send the request, start a timer. After the timer reaches the first normalized transmission duration of the request data packet, start sending the next request;

[0015] Determining the sending time of the next request for the output port based on the second normalized transmission duration of the data packet corresponding to the request further includes:

[0016] When starting to send the request, start a timer. After the timer reaches the second normalized transmission duration of the request data packet, start sending the next request.

[0017] In an optional embodiment, after determining the sending time of the next request for the input port, the method further includes:

[0018] Using the arbitration logic of the input port to balance the traffic distribution among multiple input ports according to a preset weight;

[0019] Before determining the sending time of the next request for the output port, the method further includes:

[0020] Using the arbitration logic of the output port to balance the traffic distribution among multiple output ports according to a preset weight.

[0021] In an optional embodiment, the method further includes:

[0022] Receiving a rate feedback signal, and adjusting the bandwidth allocated to the input port or output port according to the rate feedback signal;

[0023] Based on the adjusted bandwidth, re-determine the first or second normalized transmission duration of the data packet corresponding to the request;

[0024] Based on the re-determined first or second normalized transmission duration, re-determine the sending time of the next request.

[0025] In an optional embodiment, before receiving the rate feedback signal, it further includes:

[0026] When a rate change, a change in the working mode, or other node abnormal events occur, send the rate feedback signal to the device.

[0027] According to a second aspect of the present application, there is provided a traffic control and balancing device, including:

[0028] A first request receiving unit, configured to receive an external request through an input port of the device and determine the size of the request data packet;

[0029] A first transmission duration determining unit, configured to obtain the bandwidth and actual data bit width allocated to the input port, and determine a first normalized transmission duration of the data packet corresponding to the request according to the size of the request data packet, the actual data bit width, and the bandwidth;

[0030] A first time normalization unit, configured to determine the sending time of the next request of the input port based on the first normalized transmission duration of the request data packet;

[0031] A second request receiving unit, configured to allocate the request to a specified output port according to the route corresponding to the request;

[0032] A second transmission duration determining unit, configured to obtain the bandwidth and actual data bit width allocated to the output port, and determine a second normalized transmission duration of the data packet corresponding to the request according to the size of the request data packet, the actual data bit width, and the bandwidth;

[0033] A second time normalization unit, based on the second normalized transmission duration of the request data packet, determines the sending time of the next request of the output port.

[0034] Compared with the related art, the technical solution of the present application has the following advantages:

[0035] It converts disorderly competition into orderly competition, ensures dynamic bandwidth allocation according to the real-time status and request conditions of each input port and each output port of the node; smooths out bandwidth fluctuations, performance imbalance, and system latency caused by a sudden large number of requests; allocates on demand and according to actual capabilities, avoiding system congestion and deadlocks. This method adjusts the bandwidth allocation of the node in real time according to rate feedback, dynamically adjusts the node bandwidth, and realizes traffic and bandwidth adaptive balance. The data channels that the switching node needs to dock can be parameterized defined and designed, with flexible reuse and fast network expansion. This method is widely applicable to each switching node inside the chip, sub-nodes as virtual nodes inside the chip, and even the entire chip and larger system dimensions regarded as switching nodes. Therefore, this method is not limited to the design in the physical concept. The input ports and output ports of the node can be controlled in both the physical channel concept and the virtual channel concept, and can be arbitrarily extended and implemented as long as the ports are given identifiable identities.

[0036] Other features and advantages of the present application will be described in the subsequent specification, and will be partially obvious from the specification, or will be understood by implementing the present application. The objectives and other advantages of the present application can be achieved and obtained through the structures and processes pointed out in the specification, claims, and drawings. Description of the Drawings

[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present application or in the related art, the following will briefly introduce the drawings required for use in the description of the embodiments or the related art. Obviously, the drawings in the following description are certain embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0038] Figure 1 It is a schematic diagram of the problems of congestion, delay, bandwidth fluctuation, and bandwidth imbalance caused by unordered competition.

[0039] Figure 2 It is a schematic diagram of solving congestion, delay, bandwidth fluctuation, and bandwidth imbalance problems by ordered competition.

[0040] Figure 3 It is a function implementation diagram of a switching node according to an exemplary embodiment of the present application.

[0041] Figure 4 It is a general flowchart of a traffic balance control method according to an exemplary embodiment of the present application.

[0042] Figures 5 - 7 It is a flowchart of an exemplary embodiment of a traffic balance control method according to the present application.

[0043] Figure 8 A traffic control and balance system diagram according to an exemplary embodiment of the present application. Detailed Embodiments

[0044] In order to make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some, but not all, of the embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present application.

[0045] Traditional traffic and balancing methods mainly control based on the number of requests. For example, "credit" in the PCIe protocol and "outstanding" in the AXI bus protocol. "Credit" ensures the orderliness of data transmission and avoids packet loss, and whether data can be sent and received is guaranteed by "credit" between the sender and receiver. The number of "outstanding" represents the ability to continuously transmit data during the transmission process without completion. Therefore, whether it is "credit", "outstanding" or other mechanisms, they are essentially transmission mechanisms based on the number of requests. Data can be transmitted within the pre-allocated number of requests. One request actually corresponds to the ability to transmit a certain size of data packet. Once the requests are exhausted, one can only wait for the data transmission of the previous requests to complete and release new request quantities before continuing the transmission.

[0046] Traditional traffic and balancing methods only consider controlling the transmission ability within a pre-given capacity range. Since each request for data transmission requires actual transmission time, sending requests according to the pre-allocated capacity cannot solve the problem of excessive bandwidth occupation caused by bursty access, nor can it solve the disorderly competition among multiple masters, let alone give differential control according to different slaves, resulting in excessive traffic fluctuations, low bandwidth utilization, increased latency and even blocking of other ports due to disorderly competition, leading to system congestion. Moreover, since the pre-given number of requests cannot be adaptively adjusted when the actual bandwidth allocation in the system has changed, once the bandwidth changes in the system, the request capacity is too small, resulting in insufficient actual bandwidth utilization, or the request capacity is too large, resulting in system overload and congestion. At the same time, it cannot ensure that the capabilities of nodes are evenly released for use by requests from other ports, and excessive requests from a single port further cause other multiple ports to be unable to obtain requests in time, introducing excessive system latency and resulting in uneven bandwidth allocation between ports. Once this problem spreads, the entire system will become congested and paralyzed.

[0047] Such as Figure 1As shown in the figure, assume that three master devices M0, M1, and M2 can access slave devices S0, S1, and S2 through node N0. If master device M1 issues multiple requests REQ0, REQ1, REQ2, … REQL according to its own capabilities, the short-term intensive requests will quickly lead to congestion, so that the requests REQM and REQN issued by the other two master devices M1 and M2 cannot be processed in time. At the same time, since the data transmission time required after the request of master device M0 reaches slave device S3 becomes longer due to excessive requests, the data transmission delay obtained after the requests of other subsequent master devices reach S3 also becomes longer. Moreover, due to the disordered request competition among master devices and the disordered request competition reaching slave devices after passing through node routing, the system bandwidth fluctuates too much with the change of competition (change in the number of requests), and it also makes it impossible to achieve a fair, reasonable, and balanced system bandwidth allocation.

[0048] As Figure 2 shown, on the slave device side, in terms of time, only after completing the data transmission of one request can the data transmission of another new request be completed. Therefore, the actual data transmission behavior determines that all requests are only cached in the request queue. In the best case, when a new request can obtain a new data transmission time, it can only continue to be transmitted in a non-stop form after the data transmission of the previous request is completed. This is the actual physical limit of the system, as shown by each data transmission time represented by the dotted boxes D0, D2, …, DN in Figure 2 . Therefore, if each request is processed in a normalized, discretized, and uniform manner according to the actual system capabilities, the disordered competition can be transformed into an ordered competition, thereby solving the problems of blocking, delay, bandwidth fluctuation, and bandwidth imbalance caused by disordered competition in the traditional flow control and balancing processes. On this basis, further considering the dynamic change process of the system bandwidth (such as the system bandwidth change caused by rate negotiation change, the working modes of master and slave devices, whether the master and slave devices have started working, etc.), dynamic normalization, discretization, and uniformization processing are realized, so as to solve the problems in the traditional flow control and balancing processes in real time and efficiently.

[0049] Based on the above analysis, the present application provides a method and apparatus for traffic control and balancing, which changes the disorderly competition in the system into orderly competition, and performs orderly allocation and traffic balancing according to the input bandwidth and output bandwidth of each device in the system. Differential control is performed on the input and output of the node according to the actual or real-time allocated upper limit bandwidth. When the number of access ports of the input node changes, resulting in different input bandwidths, or the working mode of some access ports changes, resulting in different input bandwidths, or other fluctuations cause different input bandwidths, real-time on-demand allocation is performed, and orderly competition control is performed in the output direction. The allocation of bandwidth is always based on the actual capabilities of different output nodes and the input request capabilities, ensuring balanced allocation according to the actual request capabilities among all input bandwidth requests, and the bandwidth allocation can be dynamically controlled in real time according to the rate fluctuations occurring in the system.

[0050] Taking the switching node as an example, Figure 3 This is a functional diagram of a switching node for an exemplary embodiment of the present application. By implementing multiple switching nodes that control and balance according to the data stream, after connecting the paths in the system as required, the traffic control and balancing of the entire system can be achieved. The number of switching nodes in the system is allocated according to the system situation, and the number of input ports and output ports of each switching node can be the same or different. Figure 3 Each functional component in the switching node is described as follows:

[0051] IN is an input array of an M + 1 port on the switching node. The input port can be regarded as the initiator of the access. There is both an access initiation process and a feedback process of the access result on each input port, so it is a bidirectional port;

[0052] MR0, MR1, MR2, MR3, …, MRM are the corresponding requests on each input port. The requests are usually initiated by the upstream node or the upstream master device. The request is the processing process in the sending direction in different protocols. For example, in the PCIe protocol, it corresponds to the sending process of the request packet (read request packet or write request packet); in the AXI protocol, it corresponds to the sending process of the request (read) or the request and data packet (write);

[0053] MA0, MA1, MA2, MA3, …, MAM are the corresponding responses on each input port. The responses are usually returned by the downstream node or the downstream slave device, and are the return and confirmation of the corresponding request result, that is, the processing process in the receiving direction;

[0054] IN0, IN1, IN2, IN3, …, INM are the control logics corresponding to each input port, and the above-mentioned temporal normalization control is performed according to the size of the data packet corresponding to each request. The size of the data packet corresponding to the request, the data bit width, and the bandwidth capacity allocated to this port determine that the duration occupied by the currently transmitted data is different when there is a request and transmitted data, or the duration occupied by the response return data corresponding to this request is different when there is data return. According to this strategy, the occupied duration allocated to each request is normalized and discretized, that is, the next allowed request after each request can only be sent after the normalization duration of the current request;

[0055] MP0, MP1, MP2, MP3, …, MPM are the protocol conversion processing modules corresponding to each input port. Since the input requests may come from different protocols, protocol conversion processing needs to be provided to simplify the routing design;

[0056] MA0 is the arbitration logic of the input matrix, which is an optional design. According to the weight distribution, it ensures that after the traffic control of each input and output port, the traffic distribution between each input and output port can still be balanced according to the set weight;

[0057] R0 is the routing mapping. All input requests are allocated to different output requests according to the routing mapping, that is, the corresponding output port is found by routing according to the destination where the request arrives. At the same time, the corresponding response is returned to the request end of the input port according to the routing mapping;

[0058] OUT is an M + 1 output matrix on the switching node. The requests of the input ports enter the output matrix after being routed by R0. At the same time, after the response returns, it enters the routing mapping from the output matrix and then returns to the input port. Therefore, each output port of the output matrix is also a bidirectional port;

[0059] SA0 is the arbitration logic of the output matrix, which is an optional design. According to the weight distribution, it ensures that after the traffic control of each input and output port, the traffic distribution between each input and output port can still be balanced according to the set weight;

[0060] OUT0, OUT1, OUT2, OUT3, …, OUTN are the control logics corresponding to each output port. The requests reaching each output port after routing mapping are also subject to temporal normalization control according to the size of the data packet corresponding to each request. The normalization and discretization strategies are the same as those of IN0, IN1, IN2, IN3, …, INM;

[0061] SP0, SP1, SP2, SP3, …, SPN are the protocol conversion processing modules corresponding to each output port. Since the output ports may correspond to different protocol types, possible protocol conversion processing needs to be provided to support different protocols;

[0062] SR0, SR1, SR2, SR3, …, SRN are the corresponding requests on each output port. After being routed and mapped, they are transmitted from the input port through the output port to the next node or slave device.

[0063] SA0, SA1, SA2, SA3, …, SAN are the corresponding responses on each output port. The responses are usually returned by the downstream node or the downstream slave device. After being routed and mapped, they are returned to the corresponding input port and then back to the upstream node or master device.

[0064] RF0 is the rate feedback signal, which is used to adjust the traffic of the switching node or some ports. Since the bandwidth in the system may change dynamically, for example, rate changes, working mode changes, or other node abnormalities may all cause dynamic changes in the system bandwidth, these rate feedback signals can be used to adjust the bandwidth allocation on the switching node in real time.

[0065] C0 is a configurable register, which is used to change the dynamic control strategy. For example, it can implement different control strategies for the maximum bandwidth, guaranteed bandwidth, or priority of the specified input port or output port. Given different control strategies for these ports, it can be equivalently transformed into the normalization and discretization processing of the port.

[0066] DA0 is the dynamic adjustment control unit, which is used to dynamically adjust the traffic of the switching node or some ports according to the rate feedback signal RF0 or the configurable register C0. It mainly adjusts in real time according to the switching node or port affected by the rate, that is, calculates the new normalized duration and performs discretization processing according to the ratio between the new bandwidth and the previous bandwidth.

[0067] As described above, on the switching node of the data path, the normalization, discretization, and uniformization processing of the input and output directions are implemented according to the size of the requested data packet, and real-time dynamic adjustment is performed according to the actual situation of the system. Each input on any switching node is regarded as the initiator or transmitter of the access, and each output is regarded as the access recipient or transmitter after routing.

[0068] Among them, normalization refers to the normalization of request waiting according to the size of the requested data packet. That is, if the size of the currently requested data packet is P0 and the transmission time of the corresponding data packet is T0, then considering the data transmission time, the next request can be sent after T0. And so on. If the size of the new requested data packet is P1 and its corresponding transmission time is T1, then the next request after that can be sent after T1. The transmission time of the data packet is related to the size of the data packet, the actual data bit width, and the actual allocation ability, etc. Therefore, according to this principle, the time for the next request to be sent after each request can be calculated in a normalized manner in time, so as to control the request rhythm.

[0069] Discretization means that after the requests of each port are normalized according to the previous time, all the requests of each port are actually discretized according to the actual capabilities.

[0070] Equalization means that after all ports are normalized and discretized as required, the requests between them will necessarily show uniform density in time. Whether in the input or output direction, when one or some ports are working or not working and when switching between working and not working, such an equalization effect will still act dynamically on all the working ports. This means that the method of the present application has nothing to do with the number of ports themselves and whether a specific port is temporarily working or not, but only with the actual bandwidth on the system switching node, how many ports are working, and the data density distribution of the requests of each port per unit time. Therefore, traffic control and balance can be achieved.

[0071] Based on the structure of the above switching node, referring to Figure 4 the flowchart of, the traffic balance control method provided by the present application includes:

[0072] Step 101: Receive an external request through the input port of the device and determine the size of the request data packet;

[0073] Step 102: Obtain the bandwidth and actual data bit width allocated to the input port, and determine the first normalized transmission duration of the data packet corresponding to the request according to the size of the request data packet, the actual data bit width, and the bandwidth;

[0074] Step 103: Based on the first normalized transmission duration of the request data packet, determine the sending time of the next request of the input port;

[0075] Step 104: Allocate the request to the specified output port according to the route corresponding to the request;

[0076] Step 105: Obtain the bandwidth and actual data bit width allocated to the output port, and determine the second normalized transmission duration of the data packet corresponding to the request according to the size of the request data packet, the actual data bit width, and the bandwidth;

[0077] Step 106: Based on the second normalized transmission duration of the request data packet, determine the sending time of the next request of the output port.

[0078] As Figure 5 According to an optional implementation manner, in step 103, based on the first normalized transmission duration of the request data packet, determining the sending time of the next request of the input port specifically includes:

[0079] Step 203: Start a timer when starting to send the request. After the timer reaches the first normalized transmission duration of the request data packet, start sending the next request.

[0080] The step 106, determining the sending time of the next request of the output port based on the second normalized transmission duration of the request data packet, specifically includes:

[0081] Step 206: Start a timer when starting to send the request. After the timer reaches the second normalized transmission duration of the request data packet, start sending the next request.

[0082] The size of the data packet corresponding to the request, the data bit width, and the bandwidth capacity allocated to the port determine that the request and the transmitted data corresponding to the request or the response data corresponding to the request take different durations. According to this strategy, normalize and discretize the occupied duration allocated to each request, that is, the next request allowed after each request can only be sent after the normalized duration of the current request. For example, if the size of the data packet of the current request is P0 and the data packet transmission time corresponding to the request is T0, considering the data transmission time, the time to send the next request can be after T0. And so on, if the size of the data packet of the new request is P1 and its corresponding transmission time is T1, the next request after that can be sent after T1.

[0083] Such as Figure 6 , according to an optional implementation manner, after the step 103, the method further includes:

[0084] Step 1031: Use the arbitration logic of the input port to balance the traffic distribution among multiple input ports according to a preset weight.

[0085] According to an optional implementation manner, before the step 106, the method further includes:

[0086] Step 1061: Use the arbitration logic of the output port to balance the traffic distribution among multiple output ports according to a preset weight.

[0087] Such as Figure 7 , according to an optional implementation manner, after the step 106, the method further includes:

[0088] Step 107: Receive a rate feedback signal, adjust the bandwidth allocated to the input port or the output port according to the rate feedback signal, and based on the adjusted bandwidth, re-determine the first or second normalized transmission duration of the request data packet. Based on the re-determined first or second normalized transmission duration, re-determine the sending time of the next request data packet.

[0089] In a specific embodiment, when events such as rate change, working mode change, or other node anomalies occur, the rate feedback signal is generated, thereby performing bandwidth reallocation.

[0090] Figure 8 This is a system connection implementation diagram after the switching node designed by this application. Each circle represents a switching node within the chip. For the starting node without input and the end node without output, in fact, in the system, it corresponds to the control concepts of a master device and a slave device. That is to say, from the example of the switching node, it is easy to think of a master device as the initiator of access. As long as the control related to the output port is designed well, it still meets the inventive concept of this application; similarly, a slave device as the recipient of access, as long as the control related to the input port is designed well, it still meets the inventive concept of this application. Further, in a broad sense, the switching node is not limited to within the chip. After the method of this application is extended to the chip or a higher system level, it actually still follows the concept of the switching node of this application.

[0091] Using the method of this application, time normalization, discretization, and uniform allocation are performed on any switching node according to the allocated input requests and the routed and allocated target output requests, avoiding overcrowding and disorderly competition. If the bandwidth of the input request is less than the actual output request bandwidth capacity, all input requests will obtain the bandwidth capacity allocated according to their own request situations. If there is an input request with a bandwidth greater than the actual output request bandwidth capacity, since all input requests have been time-normalized, discretized, and uniformly allocated, each master of the requests will obtain the corresponding allocation ratio on the output request bandwidth according to the actual request situation. When there is a new input request, since all previous input requests have been time-normalized, discretized, and uniformly allocated, regardless of whether the new input request causes the output request bandwidth to be greater than the actual system capacity, the allocation is always balanced and fair, and it will not cause the new input request to fail to obtain a timely response. The output requests are time-normalized, discretized, and uniformly allocated according to the routed target requests, achieving differential control and allocation according to the delays and requests between different targets, maximizing the avoidance of system congestion and deadlocks, ensuring that all requests are evenly and balancedly allocated according to the actual system capacity, avoiding excessive bandwidth fluctuations and system delays, and adjusting the control in real time according to the actual bandwidth feedback.

[0092] Those skilled in the art can understand that the traffic balance control method provided in this application is not limited to switching nodes, but any node or device in the network. When the device is only a receiver, that is, it only has input ports and no output ports, only the request data packets of the input ports need to be normalized. Similarly, when the device is only a sender, that is, it only has output ports and no input ports, only the request data packets of the output ports need to be normalized.

[0093] It can be seen that the traffic balance control method provided in this application has the following advantages compared with the related art:

[0094] It transforms disorderly competition into orderly competition, ensures dynamic bandwidth allocation according to the real-time status and request conditions of each input port and each output port of the node, smooths out bandwidth fluctuations, performance imbalance and system latency caused by a large number of sudden requests, allocates on demand and according to actual capabilities, and avoids system congestion and deadlocks. This method adjusts the bandwidth allocation of the node in real time according to the rate feedback, dynamically adjusts the node bandwidth, and realizes the adaptive balance of traffic and bandwidth. The data channels that the switching node needs to dock can be parameterized defined and designed, flexibly multiplexed and quickly networked and expanded. This method is widely applicable to each switching node inside the chip, the sub-nodes that are virtual nodes inside the chip, and even the whole chip and the switching nodes regarded from a larger system dimension. Therefore, this method is not limited to the design in the physical concept. The input ports and output ports of the node can be controlled in the physical channel concept or the virtual channel concept, as long as the ports are given recognizable identities, they can be arbitrarily expanded and implemented.

[0095] Correspondingly, this application provides a traffic balance control device in a second aspect, including:

[0096] A request receiving unit, configured to receive an external request through the input port of the device, or receive the routed request from the input port through the output port of the switching node, and determine the size of the request data packet;

[0097] A transmission duration determining unit, configured to obtain the bandwidth allocated to the input port or the output port, and determine the transmission duration of the request data packet according to the size of the request data packet, the actual data bit width, and the bandwidth;

[0098] A time normalization unit, configured to perform normalization processing based on the transmission duration of the request data packet and the transmission duration of the same data packet under the actual system capabilities, and determine the sending time of the next request of the input port or the output port.

[0099] The above device can be implemented by the traffic balance control method provided in the embodiments of the first aspect. The specific implementation manner can refer to the description in the embodiments of the first aspect and will not be elaborated here.

[0100] It can be understood that the structures, names, and parameters described in the above embodiments are only examples. Those skilled in the art can also easily combine and adjust the structural features of the above multiple embodiments according to the usage needs, and should not limit the concept of this application to the specific details of the above examples.

[0101] Although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A flow balance control method, characterized in that, including: receiving an external request through an input port of the device and determining the size of the request data packet; acquiring the bandwidth and actual data bit width allocated to the input port, and using the control logic corresponding to the input port to determine the first normalized transmission duration of the data packet corresponding to the request according to the size of the request data packet, the actual data bit width, and the bandwidth; determining the transmission time of the next request of the input port based on the first normalized transmission duration of the request data packet; allocating the request to a specified output port according to the route corresponding to the request by using route mapping; acquiring the bandwidth and actual data bit width allocated to the output port, and using the control logic corresponding to the output port to determine the second normalized transmission duration of the data packet corresponding to the request according to the size of the request data packet, the actual data bit width, and the bandwidth; determining the transmission time of the next request of the output port based on the second normalized transmission duration of the request data packet; transmitting the request of the output port to a downstream node or a slave device, receiving the reply returned by the downstream node or the slave device, returning the reply to the corresponding input port after route mapping, and transmitting the reply to an upstream node or a master device through the input port; the method further includes: when a rate change, a working mode change, or other node abnormal events occur, receiving a rate feedback signal through a dynamic adjustment control unit, and adjusting the bandwidth allocated to the input port or the output port according to the rate feedback signal or a configurable register; re-determining the first or second normalized transmission duration of the data packet corresponding to the request based on the adjusted bandwidth; re-determining the transmission time of the next request of the input port or the output port based on the re-determined first or second normalized transmission duration.

2. The flow balance control method according to claim 1, wherein The determining the transmission time of the next request of the input port based on the first normalized transmission duration of the data packet corresponding to the request further includes: when starting to transmit the request, starting a timer, and starting to transmit the next request after the timer reaches the first normalized transmission duration of the request data packet; The determining the transmission time of the next request of the output port based on the second normalized transmission duration of the data packet corresponding to the request further includes: when starting to transmit the request, starting a timer, and starting to transmit the next request after the timer reaches the second normalized transmission duration of the request data packet.

3. The flow balance control method according to claim 1, characterized in that After determining the transmission time of the next request of the input port, the method further includes: using the arbitration logic of the input port to balance the traffic distribution among multiple input ports according to a preset weight; Before determining the transmission time of the next request of the output port, the method further includes: using the arbitration logic of the output port to balance the traffic distribution among multiple output ports according to a preset weight.

4. A flow balance control device, characterized in that, including: a first request receiving unit, configured to receive an external request through an input port of the device and determine the size of the request data packet; The first transmission duration determination unit is configured to obtain the bandwidth and the actual data bit width allocated to the input port, and use the control logic corresponding to the input port to determine the first normalized transmission duration of the data packet corresponding to the request according to the size of the request data packet, the actual data bit width, and the bandwidth; The first time normalization unit is configured to determine the transmission time of the next request of the input port based on the first normalized transmission duration of the request data packet; The second request receiving unit is configured to allocate the request to a specified output port according to the route corresponding to the request by using route mapping; The second transmission duration determination unit is configured to obtain the bandwidth and the actual data bit width allocated to the output port, and use the control logic corresponding to the output port to determine the second normalized transmission duration of the data packet corresponding to the request according to the size of the request data packet, the actual data bit width, and the bandwidth; The second time normalization unit is configured to determine the transmission time of the next request of the output port based on the second normalized transmission duration of the request data packet; Transmit the request of the output port to a downstream node or a slave device, receive the response returned by the downstream node or the slave device, return the response to the corresponding input port after route mapping, and transmit it to an upstream node or a master device through the input port; The apparatus further includes: The dynamic adjustment control unit is configured to receive a rate feedback signal when a rate change, a working mode change, or other node abnormal events occur, and adjust the bandwidth allocated to the input port or the output port according to the rate feedback signal or a configurable register; The transmission duration determination unit is further configured to re-determine the first or second normalized transmission duration of the request data packet based on the adjusted bandwidth; The time normalization unit is further configured to re-determine the transmission time of the next request based on the re-determined first or second normalized transmission duration.

5. The flow rate equalization control device according to claim 4, characterized in that The first time normalization unit is further configured to: When starting to transmit the request, start a timer, and start to transmit the next request after the timer reaches the first normalized transmission duration of the request data packet; The second time normalization unit is further configured to: When starting to transmit the request, start a timer, and start to transmit the next request after the timer reaches the second normalized transmission duration of the request data packet.

6. The flow rate equalization control device according to claim 5, wherein The first time normalization unit is further configured to: After determining the transmission time of the next request of the input port, use the arbitration logic of the input port to balance the traffic distribution among multiple input ports according to a preset weight; The second time normalization unit is further configured to: Before determining the transmission time of the next request of the output port, use the arbitration logic of the output port to balance the traffic distribution among multiple output ports according to a preset weight.

Citation Information

Patent Citations

  • Data transmission method, device and system and computer readable storage medium

    CN111355667A

  • Scheduling method for time-sensitive traffic in deterministic network

    CN117692398A