Data transmission control method and electronic equipment

By setting a credit limit on the number of data packets transmitted in the virtual channel design inside the chip, the problem of uneven use of cache space is solved and a more reasonable cache resource allocation is achieved.

CN120658678APending Publication Date: 2025-09-16SMARTER SILICON (SHANGHAI) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510865636.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-25
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

In the interconnect bus design within the chip, the cache space of the virtual channels is limited and unevenly used, resulting in some virtual channels occupying a large amount of cache space and being unable to reasonably control the use of cache space.

Method used

By determining the target parameters of the target virtual channel and setting the maximum credit limit to limit the number of data packets transmitted, the data transmission control of the virtual channel is dynamically adjusted based on the actual round-trip delay of the credit signal and the benchmark credit limit.

Benefits of technology

It effectively reduces the excessive occupation of cache space by virtual channels, improves the reasonable allocation of cache space, and avoids resource waste and cache space preemption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120658678A_ABST
    Figure CN120658678A_ABST
Patent Text Reader

Abstract

The invention discloses a data transmission control method and electronic equipment, and the method comprises the steps: determining a target parameter of a target virtual channel, and enabling the target parameter to be used for representing the congestion state of the target virtual channel, the target virtual channel is one of a plurality of virtual channels built on a physical channel between the first routing node and the second routing node; based on the target parameter of the target virtual channel, determining the highest credit line corresponding to the target virtual channel, the highest credit line representing the highest number of data packets allowed to be transmitted by the target virtual channel; and controlling data transmission on the target virtual channel based on the highest credit line corresponding to the target virtual channel.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data transmission, and in particular to a data transmission control method and electronic device. Background Art

[0002] Currently, chips use interconnect buses to connect different modules within the chip. To address head-of-line blocking (HOL blocking) and deadlock issues within these interconnect bus designs, virtual channel technology has been proposed. In this interconnect bus design, the physical channels between any two nodes acting as routers within the chip can carry two or more virtual channels, and different virtual channels can be used to transmit different service data.

[0003] After data is transmitted over a virtual channel, the receiving node in the virtual channel needs to cache the received data in its buffer space. The receiving node's buffer space can be shared by multiple virtual channels. However, due to limited buffer space and the varying service characteristics carried by different virtual channels, it's easy for a small number of virtual channels to occupy a significant portion, or even all, of the shared buffer space, making it difficult to effectively control buffer space usage across virtual channels. Summary of the Invention

[0004] In one aspect, the present application provides a data transmission control method, comprising:

[0005] Determining a target parameter of a target virtual channel, where the target parameter is used to characterize a congestion state of the target virtual channel, where the target virtual channel is one of multiple virtual channels established on a physical channel between a first routing node and a second routing node;

[0006] Determining a maximum credit limit corresponding to the target virtual channel based on a target parameter of the target virtual channel, where the maximum credit limit represents a maximum number of data packets allowed to be transmitted by the target virtual channel;

[0007] Based on the highest credit limit corresponding to the target virtual channel, data transmission on the target virtual channel is controlled.

[0008] In one possible scenario, determining target parameters of the target virtual channel includes:

[0009] determining an actual round trip delay of a credit signal on a target virtual channel;

[0010] The determining, based on the target parameter of the target virtual channel, a maximum credit limit corresponding to the target virtual channel includes:

[0011] Based on the actual round-trip delay, a maximum credit limit corresponding to the target virtual channel is determined.

[0012] In yet another possible scenario, determining an actual round-trip delay of a credit signal on the target virtual channel includes:

[0013] In response to satisfying the delay detection condition and detecting that the first routing node sends service data to the second routing node via the target virtual channel, determining the sending time of the service data as the start time of detecting the round-trip delay of the credit signal;

[0014] In response to the first routing node receiving the target credit signal returned by the second routing node for the business data, the time when the first routing node receives the target credit signal is determined as the end time of the round-trip delay for detecting the credit signal, and the actual round-trip delay of the credit signal is determined based on the start time and end time.

[0015] In another possible scenario, in response to satisfying the delay detection condition and detecting that the first routing node sends service data to the second routing node via the target virtual channel, determining the sending time of the service data as the start time of detecting the round-trip delay of the credit signal includes:

[0016] In response to the first routing node sending service data to the second routing node via the target virtual channel and the first routing node is not currently in a round-trip delay statistics state for a credit signal, determining a sending time of the service data as a start time for detecting a round-trip delay for the credit signal;

[0017] The first routing node receiving a target credit signal returned by the second routing node with respect to the service data includes:

[0018] It is detected that the first routing node receives a credit signal returned by the second routing node, and the number of credit signals returned from the second routing node in the time period from the start time to the current time reaches a target number, where the target number is the credit limit used on the target virtual channel at the start time.

[0019] In another possible scenario, determining the maximum credit limit corresponding to the target virtual channel based on the actual round-trip delay includes:

[0020] Determining a maximum credit limit corresponding to the target virtual channel based on the actual round-trip delay and a benchmark credit limit corresponding to the target virtual channel;

[0021] The reference credit limit is used to represent the maximum number of data packets allowed to be transmitted by the target virtual channel when the congestion state of the target virtual channel meets a set condition.

[0022] In another possible scenario, determining the maximum credit limit corresponding to the target virtual channel based on the actual round-trip delay and the benchmark credit limit corresponding to the target virtual channel includes any one of the following:

[0023] Determine a difference between twice the value of the reference credit limit and the number of clock cycles corresponding to the actual round-trip delay, and set the value of the maximum credit limit corresponding to the target virtual channel to the difference;

[0024] Determine a maximum credit limit corresponding to the target virtual channel based on the actual round-trip delay and a benchmark round-trip delay and a benchmark credit limit corresponding to the target virtual channel, wherein if the actual round-trip delay is the same as the benchmark round-trip delay, determine the benchmark credit limit as the maximum credit limit corresponding to the target virtual channel; if the actual round-trip delay is greater than the benchmark round-trip delay, determine a maximum credit limit corresponding to the target virtual channel based on the difference between the actual round-trip delay and the benchmark round-trip delay and the benchmark credit limit, wherein the maximum credit limit is not less than 1;

[0025] The benchmark round-trip delay is the time required for the first routing node to obtain the credit signal returned by the second routing node through the target virtual channel when the congestion status of the target virtual channel meets the set condition.

[0026] In another possible scenario, determining target parameters of the target virtual channel includes:

[0027] In response to the first routing node sending service data to the second routing node via the target virtual channel and the parameter statistics period is not currently in progress, determining that a parameter statistics period has begun, and setting an initial value of a target parameter counter to a target value, where the target value is twice the base credit limit minus one;

[0028] During the parameter statistics period, every time a clock cycle passes, the value of the target parameter counter is reduced by one;

[0029] In response to the first routing node receiving a credit signal returned by the second routing node and the number of credit signals returned from the second routing node within the parameter statistical period reaching a target number, confirming that the parameter statistical period has ended, and determining the current count value of the target parameter counter as a target parameter; the target number is the credit limit used on the target virtual channel when entering the parameter statistical period;

[0030] The reference credit limit is used to represent the maximum number of data packets allowed to be transmitted by the target virtual channel when the congestion state of the target virtual channel meets a set condition.

[0031] In another possible scenario, determining the maximum credit limit corresponding to the target virtual channel based on the target parameter of the target virtual channel includes:

[0032] The value corresponding to the target parameter is set to the maximum credit limit corresponding to the target virtual channel.

[0033] In another possible scenario, controlling data transmission on the target virtual channel based on a maximum credit limit corresponding to the target virtual channel includes:

[0034] If the available credit limit corresponding to the target virtual channel at the current moment is greater than the maximum credit limit, setting the available credit limit corresponding to the target virtual channel to the maximum credit limit, and controlling data transmission on the target virtual channel based on the available credit limit;

[0035] If the available credit limit corresponding to the target virtual channel at the current moment is less than the maximum credit limit, and the sum of the available credit limit and the used credit limit corresponding to the target virtual channel at the current moment is less than the maximum credit limit, the value of the available credit limit corresponding to the target virtual channel is set to the difference between the maximum credit limit and the used credit limit, and based on the available credit limit, the data transmission on the target virtual channel is controlled.

[0036] In yet another aspect, the present application further provides an electronic device, comprising: at least two routing nodes and physical channels between different routing nodes, wherein the physical channel between a first routing node and a second routing node is configured with at least two virtual channels, and the first routing node and the second routing node transmit data through the virtual channels, and the first routing node and the second routing node are any two routing nodes in the electronic device;

[0037] The electronic device further includes: a transmission control module deployed on the first routing node or the second routing node;

[0038] The transmission control module is configured to determine a target parameter of a target virtual channel, where the target parameter is used to characterize the congestion state of the target virtual channel, where the target virtual channel is one of at least two virtual channels established on a physical channel between a first routing node and a second routing node; determine a maximum credit limit corresponding to the target virtual channel based on the target parameter of the target virtual channel, where the maximum credit limit characterizes the maximum number of data packets allowed to be transmitted by the target virtual channel; and control data transmission on the target virtual channel based on the maximum credit limit corresponding to the target virtual channel. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The above and other features, advantages, and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the originals and elements are not necessarily drawn to scale.

[0040] Figure 1 A flow chart of the data transmission control method provided in this application;

[0041] Figure 2 A schematic diagram of another flow chart of the data transmission control method provided in this application;

[0042] Figure 3 A schematic diagram of another flow chart of the data transmission control method provided in this application;

[0043] Figure 4 A schematic diagram of another flow chart of the data transmission control method provided in this application;

[0044] Figure 5 This is a diagram of the state transition that triggers the entry and end of the parameter statistics period in this application;

[0045] Figure 6 A schematic diagram of the structure of the electronic device provided in this application. DETAILED DESCRIPTION

[0046] The embodiments of the present application are described below in conjunction with the drawings in the embodiments of the present application. The terms used in the implementation methods of the present application are only used to explain the specific embodiments of the present application and are not intended to limit the present application. It is known to those skilled in the art that with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0047] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, and this is merely a way of distinguishing the objects of the same attributes when describing them in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.

[0048] like Figure 1 , shows a flow chart of the data transmission control method provided by the present application. This embodiment can be applied to electronic devices, such as, executed by a first routing node in the electronic device as a data sending end, or, executed by a second routing node as a data receiving end, without specific limitation.

[0049] The electronic device may include multiple routing nodes, which are used for storing and routing data such as messages. Physical channels may exist between different routing nodes, enabling data transmission between two routing nodes connected by a physical channel. Multiple virtual channels may be configured on the physical channel between two routing nodes. Different virtual channels on the same physical channel can be used to carry different types of service data. For example, multiple virtual channels can be constructed on the physical channels between two routing nodes based on interconnect bus technology.

[0050] Multiple routing nodes can be located on the same chip or on different chips, without limitation. For example, an electronic device may include multiple chips, such as a system-on-chip (SoC) or an artificial intelligence (AI) chip, each of which may include multiple modules. These modules may include routing nodes with routing functionality. Routing nodes may be responsible for routing and forwarding data between different modules within the chip, and may also be responsible for forwarding data from the chip to routing nodes on other chips.

[0051] In the present application, the first routing node and the second routing node may be any two routing nodes in the electronic device that are connected to each other through a physical channel.

[0052] The method of this embodiment may include:

[0053] S101, determining target parameters of a target virtual channel.

[0054] The target virtual channel is one of multiple virtual channels established on the physical channel between the first routing node and the second routing node. The solution of the present application is applicable to controlling data transmission on any virtual channel between the first routing node and the second routing node. Therefore, the target virtual channel can be any one of the multiple virtual channels.

[0055] This target parameter is used to characterize the congestion status of the target virtual channel. The congestion status of the target virtual channel reflects the time required to transmit a data packet through the target virtual channel (i.e., to other modules or routing nodes other than the first routing node and the second routing node). Therefore, the more data packets queued for transmission on the target virtual channel, the longer it takes to complete the forwarding of a data packet through the target virtual channel, and therefore the more severe the congestion of the target virtual channel.

[0056] It is understandable that, because data packets on the target virtual channel need to be transmitted from the first routing node to the second routing node via the target virtual channel, and ultimately transmitted to the second routing node's downstream node via the second routing node, the congestion state of the target virtual channel is essentially related to the number of data packets currently queued for transmission by the second routing node, obtained by the second routing node via the target virtual channel. If the number of data packets queued for transmission from the target virtual channel on the second routing node is large, it will take longer for the first routing node to complete data packet forwarding via the target virtual channel and through the second routing node.

[0057] As can be seen from the above, the target parameter can have many possibilities. For example, the target parameter can be the time required for the target virtual channel to complete the transmission of a data packet (that is, the time required for the data packet to pass through the target virtual channel and be forwarded outward by the second routing node), or the number of data packets queued for transmission on the target virtual channel (that is, the number of data packets from the target virtual channel queued for transmission in the second routing node), or the ratio of the number of data packets queued for transmission on the target virtual channel to the maximum number of data packets allowed to be transmitted on the target virtual channel, etc., without specific restrictions.

[0058] S102: Determine a maximum credit limit corresponding to the target virtual channel based on target parameters of the target virtual channel.

[0059] The maximum credit limit represents the maximum number of data packets allowed to be transmitted on the target virtual channel. Therefore, the maximum credit limit can be used to limit the maximum number of data packets currently queued for transmission on the target virtual channel, that is, the maximum number of data packets allowed to be transmitted continuously at a single time. For example, if the maximum credit limit is 6, the target virtual channel can only transmit a maximum of 6 data packets at a single time. Therefore, at any given moment, the number of data packets queued for transmission on the target virtual channel will not exceed 6.

[0060] S103: Control data transmission on the target virtual channel based on the maximum credit limit corresponding to the target virtual channel.

[0061] It is understood that, because the maximum credit limit is used to limit the maximum number of data packets allowed to be continuously transmitted on the target virtual channel at a time, based on this maximum credit limit, the number of data packets queued for transmission on the target virtual channel can be controlled to not exceed this maximum credit limit. Accordingly, once the number of data packets waiting for transmission on the target virtual channel reaches this maximum credit limit, no new data packets are allowed to be transmitted to the target virtual channel. This naturally limits the storage resources that can be occupied by data packets queued for transmission on the target virtual channel, thereby reducing the situation where a congested target virtual channel occupies a large amount of storage resources.

[0062] For example, if the number of packets queued for transmission on the target virtual channel reaches the maximum credit limit, the first routing node will temporarily stop transmitting packets to the second routing node via the target virtual channel. Consequently, the second routing node will no longer receive packets from the target virtual channel, thus avoiding the need to allocate new buffer space for storing packets on the target virtual channel. Conversely, if the number of packets queued for transmission on the target virtual channel has not yet reached the maximum credit limit, the first routing node may still transmit packets to the second routing node via the target virtual channel when it needs to send packets.

[0063] From the above content, it can be seen that for any target virtual channel built on the physical channel of two routing nodes, this application will determine the target parameter used to characterize the congestion state of the target virtual channel, and determine the maximum credit limit corresponding to the target virtual channel based on the target parameter, so that the maximum number of data packets allowed to be transmitted on the target virtual channel can be reasonably controlled based on the congestion state of the target virtual channel, which naturally can reduce the situation where the congested virtual channel occupies too much cache resources shared by multiple virtual channels on the physical channel, and thus can more reasonably control the occupation of each virtual channel for the shared cache space.

[0064] It is understandable that in addition to directly controlling the data transmission on the target virtual channel based on the maximum credit limit, in some application scenarios, the data transmission on the target virtual channel can also be controlled based on the current available credit limit of the target virtual channel. Among them, the available credit limit of the target virtual channel refers to the credit limit currently remaining on the target virtual channel. In this case, each time the first routing node transmits a data packet to the target virtual channel, the available credit limit of the target virtual channel will be reduced by 1; and each time the second routing node completes the forwarding processing of a data packet, the second routing node will return a credit signal to the first routing node, and accordingly, the available credit limit on the target virtual channel will be increased by 1.

[0065] On this basis, after determining the maximum credit limit, this application can set the available credit limit corresponding to the target virtual channel to the maximum credit limit if the available credit limit corresponding to the target virtual channel at the current moment is greater than the maximum credit limit, and control the data transmission on the target virtual channel based on the available credit limit.

[0066] Accordingly, if the currently available credit limit for the target virtual channel is less than the maximum credit limit, and the sum of the currently available credit limit and the used credit limit for the target virtual channel is less than the maximum credit limit, the value of the available credit limit for the target virtual channel is set to the difference between the maximum credit limit and the used credit limit. Accordingly, data transmission on the target virtual channel can be controlled based on the available credit limit.

[0067] It can be understood that if the available credit limit corresponding to the target virtual channel at the current moment is greater than the maximum credit limit, it means that the historical maximum credit limit set for the target virtual channel is higher than the currently determined maximum credit limit, which also means that the congestion level of the target virtual channel at the current moment is aggravated. At this time, it is necessary to reduce the available credit limit corresponding to the target virtual channel and set the available credit limit to the maximum credit limit.

[0068] The used credit limit (also called the used credit limit) corresponding to the target virtual channel at the current moment is the credit limit occupied by the transmission of data packets on the target virtual channel. The used credit limit is the difference between the most recent historical maximum credit limit determined before the current moment and the available credit limit of the target virtual channel at the current moment. For example, if the most recent historical maximum credit limit is 8, and the available credit limit of the target virtual channel at the current moment is 5, the used credit limit corresponding to the target virtual channel is: 8-5=3.

[0069] It is understandable that the sum of the available credit limit and the used credit limit corresponding to the target virtual channel at the current moment is the most recently determined historical maximum credit limit. Therefore, if the sum of the available credit limit and the used credit limit corresponding to the target virtual channel is less than the maximum credit limit, it means that the historical maximum credit limit set for the target virtual channel is less than the currently determined maximum credit limit, which means that the congestion level of the target virtual channel has been reduced and the number of data packets allowed to be sent by the target virtual channel needs to be increased. On this basis, the present application can set the available credit limit to the difference between the maximum credit limit and the used credit limit, which actually increases the available credit limit and the current maximum credit limit of the target virtual channel.

[0070] Of course, if the available credit limit corresponding to the target virtual channel at the current moment is equal to the maximum credit limit, or although the available credit limit corresponding to the target virtual channel at the current moment is less than the maximum credit limit, the sum of the available credit limit corresponding to the target virtual channel at the current moment and the used credit limit is greater than the maximum credit limit, then the available credit limit can be maintained unchanged.

[0071] However, regardless of whether the current value of the available credit limit is adjusted, the maximum value of the available credit limit cannot exceed the currently determined maximum credit limit. Therefore, when the value of the available credit limit is the maximum credit limit, even if the first routing node receives the credit signal returned by the second routing node, the value of the available credit limit of the target virtual channel will no longer increase.

[0072] It is understandable that after the available credit limit is updated based on the maximum credit limit, the used credit limit of the target virtual channel will actually be updated to the difference between the maximum credit limit and the available credit limit, so that after the congestion status of the target virtual channel changes and the new maximum credit limit is re-determined, the available credit limit can still be accurately adjusted.

[0073] In the present application, there may be multiple possible target parameters for characterizing the congestion state of the target virtual channel. The following introduces the solution of the present application by taking several possible cases of the target parameters as examples.

[0074] For a possible case of target parameters, the following is combined Figure 2 To explain, such as Figure 2 , shows another flow chart of the data transmission control method provided by the present application. The method of this embodiment can be applied to the electronic device mentioned above, which includes a first routing node and a second routing node. The method of this embodiment may include:

[0075] S201 : Determine the actual round-trip delay of a credit signal on a target virtual channel.

[0076] The target virtual channel is one of multiple virtual channels built on the physical channel between the first routing node and the second routing node.

[0077] In this embodiment, the target parameter is the actual round-trip delay of the credit signal.

[0078] It is understandable that virtual channels implement flow control based on a credit mechanism. One credit represents the amount of data packets (or minimum data units) that can be received by the data receiving end of the virtual channel. Each time the data receiving end of a virtual channel retrieves a data packet from the corresponding buffer space of the virtual channel and sends it to the downstream node, the data receiving end generates a credit signal and returns it to the data sending end of the virtual channel. Therefore, each time the data sending end receives a credit signal from the data receiving end, it indicates that a data packet sent by the data sending end through the virtual channel has been received and forwarded by the data receiving end.

[0079] Therefore, the actual round-trip delay of the credit signal refers to the time required to send a data packet from the data transmitter to the data receiver and receive the credit signal in response to that data packet. In this embodiment, since the first routing node acts as the data transmitter and the second routing node acts as the data receiver, the actual round-trip delay of the credit signal on the target virtual channel is the time required from the first routing node sending a data packet through the target virtual channel to the first routing node receiving the credit signal in response to that data packet from the second routing node.

[0080] It is understood that the time required to transmit data on the target virtual channel is calculated in clock cycles. Therefore, the actual round-trip delay of the credit signal is expressed in clock cycles. For example, the actual round-trip delay of the credit signal may be 4 clock cycles or 8 clock cycles.

[0081] It is understandable that the more data packets that are queued and waiting to be sent from the target virtual channel on the second routing node as the data receiving end, the longer it takes for the first routing node to send the data packet through the target virtual channel and for the second routing node to forward the data packet to the downstream node. Correspondingly, the longer it takes for the first routing node to receive the credit signal returned by the second routing node for the data packet, that is, the longer the actual round-trip delay of the credit signal. Therefore, it can be seen that the actual round-trip delay of the credit signal can characterize the congestion status of the target virtual channel. Among them, the longer the actual round-trip delay of the credit signal, the more serious the congestion of the target virtual channel.

[0082] S202: Determine a maximum credit limit corresponding to the target virtual channel based on the actual round-trip delay.

[0083] The maximum credit limit represents the maximum number of data packets that the target virtual channel allows to be continuously transmitted at a single time. For a detailed explanation, please refer to the previous related introduction and will not be repeated here.

[0084] It is understandable that if the time corresponding to the actual round-trip delay of the credit signal is too long, it means that there are a large number of data packets waiting to be sent out on the target virtual channel. In this case, if data packets continue to be sent to the target virtual channel, the second routing node as the data receiving end will need to allocate more cache space for the target virtual channel, causing the target virtual channel to occupy more shared cache space, which not only wastes resources but also occupies the cache space of other virtual channels that are not congested, resulting in the inability to reasonably allocate cache space. Based on this, the present application, combined with the actual round-trip delay of the credit signal on the target virtual channel, can more reasonably determine the maximum credit limit for limiting data packet transmission on the target virtual channel.

[0085] For example, the greater the actual round-trip delay of the credit signal on the target virtual channel, the smaller the maximum credit limit corresponding to the target virtual channel. For example, the maximum credit limit corresponding to the actual round-trip delay of the credit signal on the target virtual channel can be determined based on a mapping relationship between different actual round-trip delays and maximum credit limits.

[0086] For example, in one possible implementation, the present application may determine the maximum credit limit corresponding to the target virtual channel based on the actual round-trip delay of the credit signal corresponding to the target virtual channel and the benchmark credit limit corresponding to the target virtual channel.

[0087] The base credit limit is used to represent the maximum number of data packets that can be transmitted on the target virtual channel when the congestion status of the target virtual channel meets the set conditions. The congestion status of the target virtual channel meeting the set conditions can be set according to actual needs.

[0088] For example, the congestion status of the target virtual channel may satisfy the set condition that the target virtual channel is not congested, i.e., there are no data packets waiting to be sent out on the target virtual channel. Accordingly, if the target virtual channel is not congested, the maximum number of data packets allowed to be transmitted on the target virtual channel is the base credit limit.

[0089] It is understandable that, when the congestion state of the target virtual channel satisfies a set condition, the maximum number of data packets that can be transmitted through the target virtual channel can be set according to actual needs.

[0090] In one possible scenario, considering that within each clock cycle, the first routing node as the data sending end can only transmit at most one data packet to the target virtual channel; and, when the congestion status of the target virtual channel meets the set conditions, the round-trip delay of the credit signal on the target virtual channel can represent the clock cycle required for the target virtual channel to complete the processing of one data packet. Therefore, in order to avoid wasting resources within each clock cycle and maintain the congestion status of the target virtual channel to meet the set conditions, the value of the benchmark credit limit can be consistent with the value of the round-trip delay of the credit signal on the target virtual channel when the congestion status of the target virtual channel meets the set conditions.

[0091] Among them, for the sake of convenience, the round-trip delay of the credit signal on the target virtual channel when the congestion status of the target virtual channel meets the set conditions is called the benchmark round-trip delay. Based on this, the benchmark round-trip delay is the time required for the first routing node to obtain the credit signal returned by the second routing node through the target virtual channel when the congestion status of the target virtual channel meets the set conditions. Since the second routing node may return the corresponding credit signal through the target virtual channel only after the first routing node transmits a data packet to the second routing node through the target virtual channel, the benchmark round-trip delay is the time required from the first routing node to transmit a data packet to the target virtual channel to the first routing node receiving the credit signal returned by the second routing node for the data packet through the target virtual channel when the congestion status of the target virtual channel meets the set conditions.

[0092] For example, taking the case where the congestion state of the target virtual channel satisfies the set condition that the target virtual channel does not have congestion as an example, the benchmark round-trip delay is the number of clock cycles required from the first routing node sending a data packet to the second routing node to the first routing node receiving a credit signal returned by the second routing node for the data packet when the target virtual channel does not have congestion. It can be seen that when the target virtual channel does not have congestion, the benchmark round-trip delay is actually the number of clock cycles required to transmit the data packet through the target virtual channel and forward the data packet to the downstream node. On this basis, in order to avoid the situation where data packets on the target virtual channel are queued for transmission and to make full use of each clock cycle so that each clock cycle can be used to transmit data packets, the number of credits corresponding to the benchmark credit limit can be set to be the same as the number of clock cycles corresponding to the benchmark round-trip delay. For example, if the benchmark round-trip delay is 8 clock cycles, the benchmark credit limit is 8 (or 8 credits).

[0093] There are various implementation possibilities for determining the maximum credit limit based on the actual round-trip delay of the credit signal on the target virtual channel and the baseline credit limit, and these possibilities are not specifically limited. However, the congestion state of the target virtual channel generally satisfies the set conditions, meaning that the target virtual channel is not congested or is in an ideal state suitable for data transmission. Therefore, the maximum credit limit cannot exceed the baseline credit limit. Furthermore, to ensure that the target virtual channel can still transmit data packets, the value of the maximum credit limit should not be less than 1.

[0094] For example, in one implementation, the difference between twice the value of the reference credit limit and the number of clock cycles corresponding to the actual round-trip delay can be determined, and the maximum credit limit value corresponding to the target virtual channel is set to the difference. For example, the maximum credit limit Credit_limit corresponding to the target virtual channel can be expressed as: Credit_limit = L base *2-L mon , where L base is the value of the base credit limit, L mon The actual round-trip delay is the number of clock cycles corresponding to the actual round-trip delay. For example, a baseline credit limit of 4 usually indicates a baseline round-trip delay of 4 clock cycles. If the actual round-trip delay is 5 clock cycles, then 4 multiplied by 2 equals 8, and the difference between 8 and 5 is 3. Therefore, the maximum credit limit corresponding to the target virtual channel is 3.

[0095] In yet another implementation, the maximum credit limit corresponding to the target virtual channel may be determined based on the actual round-trip delay and the benchmark round-trip delay and benchmark credit limit corresponding to the target virtual channel.

[0096] If the actual round-trip delay is the same as the benchmark round-trip delay, the benchmark credit limit is determined as the maximum credit limit for the target virtual channel. If the actual round-trip delay is greater than the benchmark round-trip delay, the maximum credit limit for the target virtual channel can be determined based on the difference between the actual round-trip delay and the benchmark round-trip delay and the benchmark credit limit. The maximum credit limit is not less than 1.

[0097] For example, if the base round-trip delay is the same as the base credit limit, the maximum credit limit Credit_limit can be calculated using the following formula:

[0098]

[0099] Among them, L base is the benchmark credit limit. Of course, the value of the benchmark credit limit is the same as the benchmark round-trip delay, such as L base If L is 8, it means the benchmark round trip delay is 8 clock cycles.mon is the number of clock cycles corresponding to the actual round-trip delay. On this basis, if the actual round-trip delay is the same as the benchmark round-trip delay, then the number of clock cycles corresponding to the actual round-trip delay is the same as the value of the benchmark credit limit, that is, L mon =L base , then the maximum credit limit is the same as the base credit limit. If the actual round trip delay is greater than the base round trip delay, then the actual access delay clock cycles are greater than the base credit limit value, i.e. L mon >L base , then L base -(L mon -L base ) and 1 is determined as the maximum credit limit.

[0100] Of course, there are other ways to determine the maximum credit limit, which will not be described here.

[0101] S203: Control data transmission on the target virtual channel based on the maximum credit limit corresponding to the target virtual channel.

[0102] For step S203, reference may be made to the relevant introduction of the previous embodiment, and details will not be repeated here.

[0103] In this embodiment, determining the actual round-trip delay of the credit signal on the target virtual channel can be implemented in various ways. For example, each time the first routing node transmits a data packet to the target virtual channel, the actual round-trip delay of the credit signal returned by the first routing node for the data packet can be calculated. Based on this, the average of the actual round-trip delays of the credit signals during this period can be calculated at regular intervals, and the average value can be used as the actual round-trip delay of the credit signal on the target virtual channel.

[0104] In one possible implementation, in order to reduce the amount of data processing, the present application can also determine the actual round-trip delay of the credit signal only when the set delay detection conditions are met, so as to achieve the actual round-trip delay of the credit signal being counted for only one data packet each time, thereby reducing the amount of data processing and the complexity of counting the round-trip delay. Figure 3 For explanation. Figure 3 , shows another flow chart of the data transmission control method provided by the present application. The method of this embodiment can be applied to the electronic device mentioned above, which includes a first routing node and a second routing node. The method of this embodiment includes:

[0105] S301, in response to satisfying a delay detection condition and detecting that a first routing node sends service data to a second routing node via a target virtual channel, determining the sending time of the service data as the start time of detecting a round-trip delay of a credit signal.

[0106] The target virtual channel is one of multiple virtual channels built on the physical channel between the first routing node and the second routing node.

[0107] The delay detection condition can be set according to actual needs. For example, the delay detection condition can be that the time between the actual round-trip delay of the last detection of the credit signal and the current time exceeds a set time.

[0108] For another example, the delay detection condition may be that the round-trip delay of the credit signal is not currently being counted. In other words, the actual round-trip delay of the credit signal on the target virtual channel is currently being counted for any data packet. Accordingly, in response to the first routing node sending service data to the second routing node via the target virtual channel and the round-trip delay of the credit signal is not currently being counted, the time the service data is sent is determined as the start time for detecting the round-trip delay of the credit signal.

[0109] It can be understood that determining the sending time of the business data as the starting time of detecting the round-trip delay of the credit signal indicates that the round-trip delay statistics state of the credit signal has been entered.

[0110] Among them, the business data is a data packet carrying business information transmitted by the first routing node through the target virtual channel. Therefore, after the first routing node transmits the business data through the target virtual channel, the second routing node will also return a credit signal to the first routing node through the target virtual channel after receiving the business data and completing the forwarding processing of the business data packet. Naturally, the actual round-trip delay of the corresponding credit signal can be counted for the business data.

[0111] S302, in response to the first routing node receiving the target credit signal returned by the second routing node for the business data, the time when the first routing node receives the target credit signal is determined as the end time of the round-trip delay of detecting the credit signal, and based on the start time and the end time, the actual round-trip delay of the credit signal on the target virtual channel is determined.

[0112] It can be understood that when it is detected that the second routing node returns the target credit signal for the business data, it means that the round-trip delay statistics for the credit signal corresponding to the business data have been completed, that is, the credit signal statistics state has ended. Accordingly, the time when the first routing node receives the target credit signal can be determined as the end time of the round-trip delay of the detection credit, that is, the end time of the round-trip delay statistics.

[0113] The actual round-trip delay is equal to the time difference between the end time and the start time. For example, if the start time is the first clock cycle and the end time is the seventh clock cycle, then the actual round-trip delay of the credit signal is 6 clock cycles.

[0114] In the present application, there are various possible implementations for confirming that the credit signal received by the first routing node is the target credit signal for the service data. For example, the second routing node may add identification information for marking the service data to the returned credit signal. In this way, based on the identification information carried in the credit signal received by the first routing node, it can be determined whether the credit signal is the identification information returned for the service data.

[0115] For another example, if it is detected that the first routing node receives a credit signal returned by the second routing node, and the number of credit signals returned from the second routing node in the time period from the start time to the current time is equal to the target number, it can be determined that the credit signal currently received by the first routing node is the target credit signal returned for the business data.

[0116] The target amount is the credit limit used on the target virtual channel at the start time.

[0117] It is understandable that, since the start time is the moment when the first routing node sends service data to the second routing node via the target virtual channel, the credit limit used on the target virtual channel at the start time is actually the target number of data packets that the first routing node has transmitted via the target virtual channel and for which no credit signals have been returned, before the first routing node transmitted the service data via the target virtual channel. Based on this, if, when the first routing node receives a credit signal returned by the second routing node, it has already received the target number of credit signals between the start time and the current time, then it can be understood that the second routing node has returned the corresponding signal credit for each data packet sent prior to the service data, and the currently received credit signal is the target credit signal returned by the second routing node for the service data.

[0118] For ease of understanding, please refer to the following Table 1, which shows examples of data packets sent in different clock cycles, received credit signals, and available credit amounts, etc.:

[0119] Table 1

[0120]

[0121] In Table 1 above, the transmitted data represents data transmitted by the first routing node to the target virtual channel in different clock cycles. For example, in Table 1, in clock cycle 1, the first routing node transmits data packet F1 to the target virtual channel.

[0122] The credit signal return indicates the credit signal returned by the second routing node and received by the first routing node in different clock cycles. As shown in Table 1, the first routing node receives the credit signal C1 in clock cycle 7.

[0123] In Table 1 above, the target virtual channel's baseline credit limit is taken as 4 as an example, and the target virtual channel's initial maximum credit limit is set to this baseline credit limit. Based on this, at clock cycle 0, since the first routing node has not yet transmitted a data packet to the target virtual channel, the available credit limit is the maximum credit limit, that is, the available credit limit is 4. Subsequently, as the number of data packets transmitted on the target virtual channel increases, the available credit limit will gradually decrease. Moreover, after receiving the returned credit signal C1 in clock cycle 7, the available credit limit will be increased by one in the next clock cycle (i.e., clock cycle 8), and so on.

[0124] The used credit amount is the difference between the current maximum credit amount and the available credit amount. For example, after the first routing node sends a data packet F1 in clock cycle 1, the used credit amount will be updated to 1 in clock cycle 2.

[0125] As shown in Table 1 above, at clock cycle 1, the first routing node transmits data packet F1 to the target virtual channel, and the round-trip delay of the credit signal is not currently counted for other data packets, that is, it is not currently in the round-trip delay statistics state of the credit signal. Therefore, clock cycle 1 can be determined as the starting time for detecting the round-trip delay of the credit signal (that is, the starting clock cycle), and naturally it enters the round-trip delay statistics state of the credit signal.

[0126] Moreover, it can be seen from Table 1 that at the start time of counting the round-trip delay of the credit signal (ie, clock cycle 1), the credit amount used on the target virtual channel is 0, so the target quantity is 0.

[0127] In clock cycle 2, although the first routing node also transmits data packet F2 to the target virtual channel, it is currently in the credit signal round-trip delay statistics state, so the credit signal round-trip delay statistics for data packet F7 are no longer performed. The same is true for data packets F3 and F4 sent in clock cycles 3 and 4, respectively, and will not be repeated here.

[0128] In clock cycle 7, the first routing node receives the credit signal C1 returned by the second routing node for the target virtual channel. Furthermore, the number of credit signals returned by the second routing node to the first routing node between clock cycles 1 and 7 is also 0. Therefore, it can be determined that the credit signal C1 received by the first routing node in clock cycle 7 is the target credit signal returned for data packet F1. Accordingly, clock cycle 7 can be determined to be the end time (end clock cycle) of the round-trip delay for detecting the credit signal corresponding to data packet F1.

[0129] Based on the above, for data packet F1, the starting clock cycle for detecting the round-trip delay of the credit signal is clock cycle 1, and the ending clock cycle is clock cycle 7. Therefore, the actual round-trip delay of the credit signal can be determined to be 6 clock cycles. As shown in Table 1, at clock cycle 8, it can be determined that the actual round-trip delay of the credit signal, calculated from clock cycles 1 to 7, is 6 clock cycles.

[0130] It should be noted that since the actual round-trip delay of the credit signal is determined for the target virtual channel, in this embodiment, the credit signal returned by the second routing node and received by the first routing node refers to the credit signal related to the target virtual channel returned by the second routing node.

[0131] S303: Determine the maximum credit limit corresponding to the target virtual channel based on the actual round-trip delay.

[0132] The specific implementation of this step can be found in the related description of the previous embodiment. For example, based on the actual round-trip delay and the baseline credit limit corresponding to the target virtual channel, the maximum credit limit corresponding to the target virtual channel is determined. Of course, the maximum credit limit can also be determined using other methods mentioned above, which will not be described in detail here.

[0133] For ease of understanding, we will use Table 1 as an example to illustrate an implementation method for determining a maximum credit limit based on the actual round-trip delay and the benchmark credit limit corresponding to the target virtual channel. For example, if the benchmark credit limit of the target virtual channel is the same as the benchmark round-trip delay, after determining the actual round-trip delay, the maximum credit limit can be calculated using the previous formula. In Table 1, the benchmark credit limit is 4. In this case, if the actual round-trip delay is 6 clock cycles, the maximum credit limit can be calculated using the previous formula to be 2.

[0134] S304: Control data transmission on the target virtual channel based on the maximum credit limit corresponding to the target virtual channel.

[0135] This step can be referred to the relevant introduction of the previous embodiment and will not be described in detail again.

[0136] For ease of understanding, an example is given in which the available credit limit of the target virtual channel is adjusted based on the maximum credit limit, and data transmission of the target virtual channel is controlled based on the available credit limit of the target virtual channel, and is described in conjunction with Table 1:

[0137] As can be seen from Table 1, the actual round-trip delay of the credit signal determined in clock cycle 8 is 6 clock cycles. Assuming that the maximum credit limit determined based on this actual round-trip delay is 2, then it is necessary to control the maximum value of the available credit limit on the target virtual channel to not exceed 2.

[0138] As shown in Table 1, after the first routing node receives the returned credit signal C1 in clock cycle 7, it increments the available credit by 1 in clock cycle 8, bringing the available credit from 0 to 1. In clock cycle 8, the first routing node also receives credit signal C2. However, since the first routing node transmits data packet F5 to the target virtual channel, this also consumes one credit. Therefore, the credit counted in clock cycle 9 is still 1. Based on this, after the first routing node receives credit signal C3 in clock cycle 9, it also increments the available credit by 1 in clock cycle 10, bringing the available credit to 2.

[0139] Although the first routing node also receives a returned credit signal C4 in clock cycle 10, since the value of the available credit limit is already the maximum credit limit value 2, the value of the available credit limit will still be maintained at the maximum credit limit in clock cycle 11 and will not continue to increase, so that the first routing node can only transmit a maximum of two data packets to the target virtual channel.

[0140] In addition, it can be seen from Table 1 that after the current maximum credit limit is determined in clock cycle 8, the available credit limit will be adjusted, and the occupied credit limit will also be adjusted.

[0141] On this basis, combined with the previous introduction to Table 1, it can be seen that when the first routing node sends data packet F5 in clock cycle 8, since it is not in the round-trip delay statistics state of the credit signal at this time, clock cycle 8 is the starting time of the round-trip delay for detecting the credit signal determined for data packet F5. Correspondingly, after the first routing node receives the credit signal C5 in clock cycle 12, it can be determined that the end time of the round-trip delay for detecting the credit signal is reached. Based on clock cycle 8 and clock cycle 12, it can be determined in clock cycle 13 that the actual round-trip delay of the credit signal at the current moment is 4 clock cycles. Compared with the actual round-trip delay of the credit signal detected last time of 6 clock cycles, the actual round-trip delay of the credit signal currently corresponding to the target virtual channel has become shorter, indicating that the congestion level of the target virtual channel has become lighter. Therefore, the maximum credit limit corresponding to the target virtual channel can be increased.

[0142] Assuming the actual round-trip delay is 4 clock cycles and the maximum credit limit is determined to be 4, then at clock cycle 13, since the available credit limit is 2 and the used credit limit is 0, the available credit limit is less than the maximum credit limit, and the sum of the available credit limit and the used credit limit is also less than the maximum credit limit. Based on this, Table 1 shows that at clock cycle 13, the available credit limit will be adjusted to the difference between the maximum credit limit of 4 and the used credit limit of 0, that is, the available credit limit will be adjusted to 4.

[0143] The following combination Figure 4 Another possible situation of determining the target parameters of the target virtual channel is described below. Figure 4 Another flow chart of the data transmission control method provided by the present application is shown. The method of this embodiment can be applied to the aforementioned electronic device, which includes a first routing node and a second routing node. The method of this embodiment may include:

[0144] S401: In response to a first routing node sending service data to a second routing node via a target virtual channel and not currently in a parameter statistics period, determining that a parameter statistics period has begun, and setting an initial value of a target parameter counter to a target value.

[0145] The target parameter counter is used to count the target parameter, and the target parameter is used to represent the congestion state of the target virtual channel.

[0146] The target value is twice the base credit limit minus one. As previously described, the base credit limit represents the maximum number of data packets that can be transmitted on the target virtual channel if the congestion status of the target virtual channel meets the specified conditions. For details about the base credit limit, please refer to the relevant description of the previous embodiment and will not be repeated here.

[0147] It can be understood that when the first routing node transmits business data to the target virtual channel, if it is not currently in the parameter statistics period, it means that the round-trip delay statistics of the credit signal are not currently being performed for any data packet transmitted on the target virtual channel. In this case, when entering the parameter statistics period, the round-trip delay statistics of the credit signal can be performed only for the business data, and the round-trip delay statistics of the credit signal can be performed only for a single data packet, which can reduce the amount of data that needs to be processed.

[0148] S402 : During the parameter statistics period, the value of the target parameter counter is reduced by one every time a clock cycle passes.

[0149] It is understandable that after entering the parameter statistics period, the number of clock cycles required for the first routing node to receive the credit signal returned by the second routing node for the business data can be counted. The more clock cycles that pass, the more serious the congestion state of the target virtual channel. Based on this, in order to ensure that the target parameter counted by the target parameter counter can reflect the congestion state of the target virtual channel, the present application will reduce the value of the target parameter counter by one every clock cycle after entering the parameter statistics period until the end of the parameter statistics period.

[0150] S403, in response to the first routing node receiving the credit signal returned by the second routing node and the number of credit signals returned from the second routing node within the parameter statistical period reaching the target number, confirming that the parameter statistical period is over, and determining the current count value of the target parameter counter as the target parameter.

[0151] The target number is the amount of credit used on the target virtual channel at the time the parameter statistics period begins. It will be appreciated that entering the parameter statistics period is the starting time for determining the congestion status of the target virtual channel, i.e., the starting time for detecting the round-trip delay of the credit signal on the target virtual channel. However, in this embodiment, the round-trip delay of the credit signal need not be detected. Instead, the round-trip delay of the credit signal is represented by the count value of the target parameter counter within the parameter statistics period, which naturally indicates the congestion status of the target virtual channel.

[0152] It is understandable that when the first routing node sends service data to the second routing node via the target virtual channel, a parameter statistics period will be entered. At this time, the credit limit used on the target virtual channel is actually the target number of data packets that the first routing node has transmitted through the target virtual channel and for which no credit signals have been returned, before the first routing node transmitted the service data via the target virtual channel. Based on this, if the first routing node receives a credit signal returned by the second routing node, and has already received the target number of credit signals within the parameter statistics period, it can be understood that the second routing node has returned the corresponding signal credit for each data packet sent before the service data, and the currently received credit signal is the target credit signal returned by the second routing node for the service data.

[0153] It can be seen from this that when the first routing node receives the target credit signal returned by the second routing node for the business data, the counting of the target parameter counter ends. Then the count value of the target parameter counter can represent the number of clock cycles required from the first routing node sending the business data through the target virtual channel to the first routing node receiving the target credit signal returned for the business data. Therefore, the count value of the target parameter counter (i.e., the target parameter) can represent the number of clock cycles required for the second routing node to complete the forwarding processing of a data packet, and naturally can represent the congestion level of the target virtual channel.

[0154] Since the number of clock cycles required for the second routing node to complete the forwarding processing of a data packet is greater, the count value of the target parameter timer is lower and the target parameter value is smaller. Therefore, the larger the parameter value of the target parameter is, the lighter the congestion level of the target virtual channel is; conversely, the smaller the parameter value of the target parameter is, the more serious the congestion level of the target virtual channel is.

[0155] In order to facilitate understanding of the solution of this embodiment, Figure 5 , introduces the triggering conditions for entering and ending the parameter statistics period in this application.

[0156] Depend on Figure 5 It can be seen that if the current state is idle (i.e., not in the parameter statistics cycle) and the first routing node is detected to transmit a data packet (i.e., business data) to the target virtual channel, it will trigger the entry into the parameter statistics cycle. During the parameter statistics cycle, the initial value of the target parameter timer will be set to the target number. On this basis, the count value of the target parameter counter will be reduced by 1 for each clock cycle during the parameter cycle. If the first routing node receives the credit signal returned by the second routing node and the capture signal is valid, the parameter statistics cycle ends and switches to the idle state.

[0157] The valid capture signal indicates that the number of credit signals returned from the second routing node within the parameter statistical period reaches the target number.

[0158] In order to more intuitively understand the specific implementation of determining target parameters based on parameter statistical period, Figure 5 Based on this, the following Table 2 is used for explanation:

[0159] Table 2

[0160]

[0161] In the above Table 2, the meanings of clock cycle, transmitted data, credit signal return, available credit limit and used credit limit are the same as those of the relevant parameters in the previous Table 1 and are not repeated here.

[0162] The status in Table 2 indicates whether the current clock cycle is in an idle state or a parameter statistics period (or parameter statistics state). For example, "Idle" in the "Status" row in Table 2 indicates that the corresponding clock cycle is in an idle state; and "Count" in the "Status" row indicates that the corresponding clock cycle is in a parameter statistics period, that is, in a parameter statistics state.

[0163] The conditional parameter is a custom parameter. In the idle state, the conditional parameter is 0. When the parameter statistics cycle is triggered, the initial value of the conditional parameter is the value of the used credit limit at the current moment. For example, if the first routing node transmits data packet F1 to the target virtual channel in clock cycle 1, and the state corresponding to clock cycle 1 is the idle state, then the parameter statistics cycle is triggered at clock cycle 1. In clock cycle 2, it is determined that the parameter statistics state has been entered. If the used credit limit corresponding to the usage cycle 1 is 0, then the initial value of the conditional parameter is 0.

[0164] After entering the parameter statistics period, the value of the conditional parameter will decrease by 1 each time the first routing node receives a credit signal returned by the second routing node for the target virtual channel. However, the minimum value of the conditional parameter is 0. Therefore, a value of 0 for the conditional parameter indicates that the second routing node has returned the corresponding credit signal for the data packets sent before entering the parameter statistics period.

[0165] On this basis, during a parameter statistical period, only when the conditional parameter is 0 will the credit signal received by the first routing node be the credit signal returned by the second routing node for the data packet sent to trigger the entry into the parameter statistical period. Therefore, in this application, only when the conditional parameter is 0 will the capture signal be 1, indicating that the capture signal is valid; and when the conditional parameter is 1, the capture signal is 0, indicating that the capture signal is invalid.

[0166] On this basis, it can be seen from Table 2 above that after the first routing node sends data packet F1 in clock cycle 1, it will trigger the entry into the parameter statistics period. Since the credit limit used at this time is 0, the value of the condition parameter is 0, and the value of the capture parameter is 1.

[0167] In clock cycle 1, the value of the conditional parameter is exactly 0. However, for other parameter statistics cycles, the initial value of the conditional parameter is not necessarily 0. As shown in Table 1, when the first routing node transmits data packet F5 to the target virtual channel in clock cycle 7, the condition for triggering the parameter statistics cycle is also met. At this time, the used credit limit should be 3, so the initial value of the conditional parameter is also 3. However, the value of the conditional parameter is updated in clock cycle 8. Since the first routing node receives another credit signal in clock cycle 7, the value of the conditional parameter is also reduced by one. Therefore, the value of the conditional parameter is updated to 2 in clock cycle 8.

[0168] Based on this, when clock cycle 6 is reached, the first routing node receives the credit signal, and the value of the capture signal at this time is 1, indicating that the capture signal is valid, which means that the credit signal corresponding to the data packet sent before entering the parameter statistics period has been returned, and it is determined that the end condition of the parameter statistics period is currently met. Therefore, it will re-enter the idle state in clock cycle 7.

[0169] Among them, the count value in Table 2 is the count value of the target parameter timer. In Table 2, the benchmark credit limit is 4 as an example, so twice the benchmark credit limit minus one is 7. Therefore, in the idle state, the initial value of the target parameter timer is set to 7. Correspondingly, when clock cycle 1 triggers the entry into the parameter statistics period, the initial value of the target parameter counter is also set to 7. Therefore, when clock cycle 2 determines that the parameter statistics period has been entered, the count value of the target parameter counter is 7. On this basis, within the parameter statistics period, the count value of the target parameter counter will be reduced by 1 every clock cycle until the parameter statistics period ends. As can be seen from Table 2, the parameter statistics period ends at clock cycle 6. At this time, the count value of the target parameter counter is 3, and the value of the target parameter is 3.

[0170] Furthermore, Table 2 shows that in clock cycle 7, the first routing node sent data packet F5 to the target virtual channel, and the state was idle at this time. Therefore, in clock cycle 8, it is determined that the conditions for entering the parameter statistics period are met, and the parameter statistics period is entered. Accordingly, in clock cycle 8, the initial value of the target parameter counter is also 7. Then, the count value of the target parameter timer gradually decreases as the clock cycles increase until it reaches clock cycle 13. At the end of clock cycle 13, the count value of the target parameter counter is 2, and the value of the target parameter is 2.

[0171] Comparing the parameter statistical period from clock cycle 1 to clock cycle 6 and the parameter statistical period from clock cycle 7 to clock cycle 13, it can be seen that the number of clock cycles corresponding to the former parameter statistical period is relatively small, indicating that the time required for the second routing node to complete the forwarding processing of a data packet is relatively short, which also means that the congestion level of the target virtual channel is relatively light. Therefore, the parameter value of the target parameter will be relatively large.

[0172] With the front Figure 3 Similar to the embodiment, since this embodiment adjusts the credit limit for the target virtual channel, the credit signal returned by the second routing node to the first routing node refers to the credit signal associated with the target virtual channel returned by the second routing node to the first routing node.

[0173] S404: Determine a maximum credit limit corresponding to the target virtual channel based on the target parameter of the target virtual channel.

[0174] The maximum credit limit represents the maximum number of data packets that the target virtual channel is allowed to continuously transmit at one time.

[0175] There are many possibilities for determining the maximum credit limit based on the target parameters, and there are no specific restrictions.

[0176] Since the larger the value of the target parameter, the lighter the congestion of the target virtual channel, if the value of the target parameter is relatively large, the value of the maximum credit limit can be set relatively large; and if the value of the target parameter is relatively small, the value of the maximum credit limit can be set relatively small.

[0177] In a possible implementation, the present application may set the value corresponding to the target parameter to the maximum credit limit corresponding to the target virtual channel.

[0178] As shown in Table 2 above, at clock cycle 6, the parameter statistics cycle ends. At this time, the count value of the target parameter counter is 3, that is, the target parameter is 3, so the maximum credit limit can be set to 3.

[0179] S405 : Control data transmission on the target virtual channel based on the maximum credit limit corresponding to the target virtual channel.

[0180] This step is similar to the previous embodiment and will not be described again here.

[0181] On the other hand, the present application also provides an electronic device. Figure 6, which shows a schematic diagram of the composition structure of an electronic device provided by the present application. In this embodiment, the electronic device may include: at least two routing nodes and physical channels between different routing nodes, wherein the physical channel 603 between the first routing node 601 and the second routing node 602 is configured with at least two virtual channels, and the first routing node and the second routing node transmit data through the virtual channels. The first routing node and the second routing node are any two routing nodes in the electronic device.

[0182] The electronic device further includes: a transmission control module 604 deployed on the first routing node or the second routing node. Figure 6 In the example, the transmission control module 604 is deployed on the first routing node 601.

[0183] Among them, the transmission control module 604 is used to determine the target parameters of the target virtual channel, and the target parameters are used to characterize the congestion status of the target virtual channel. The target virtual channel is one of at least two virtual channels built on the physical channel between the first routing node and the second routing node; based on the target parameters of the target virtual channel, the maximum credit limit corresponding to the target virtual channel is determined, and the maximum credit limit characterizes the maximum number of data packets allowed to be transmitted by the target virtual channel; based on the maximum credit limit corresponding to the target virtual channel, the data transmission on the target virtual channel is controlled.

[0184] In the present application, the first routing node and the second routing node may be located on the same chip of the electronic device, or may be located on different chips, and there is no limitation on this.

[0185] It can be understood that the electronic device may further include at least part of a processor, a memory, an input unit, and an output unit, without specific limitation.

[0186] For the related operations performed by the transmission control module, please refer to the related introduction in the embodiment of the data transmission control method above, which will not be repeated here.

[0187] An embodiment of the present application also provides a computer program product including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements any one of the data transmission control methods provided in the embodiments of the present application.

[0188] A computer-readable storage medium is also provided in an embodiment of the present application. The storage medium carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any data transmission control method provided in the embodiment of the present application.

[0189] It should also be noted that the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed across multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment. In addition, in the drawings of the device embodiments provided in this application, the connection relationship between the modules indicates that there is a communication connection between them, which can be specifically implemented as one or more communication buses or signal lines.

[0190] Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course can also be implemented by special hardware including application-specific integrated circuits, special CPUs, special memories, special components, etc. In general, all functions performed by computer programs can be easily implemented with corresponding hardware, and the specific hardware structures used to implement the same function can also be diverse, such as analog circuits, digital circuits or special circuits, etc. However, for the present application, software program implementation is a better implementation method in most cases. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer's floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk or optical disk, etc., and includes a number of instructions to enable a computer device (which can be a personal computer, training equipment, or network equipment, etc.) to execute the methods described in each embodiment of the present application.

[0191] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.

[0192] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, a computer, a training device or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website, a computer, a training device or a data center. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).

Claims

1. A data transmission control method, comprising: Determining a target parameter of a target virtual channel, where the target parameter is used to characterize a congestion state of the target virtual channel, where the target virtual channel is one of multiple virtual channels established on a physical channel between a first routing node and a second routing node; Determining a maximum credit limit corresponding to the target virtual channel based on a target parameter of the target virtual channel, where the maximum credit limit represents a maximum number of data packets allowed to be transmitted by the target virtual channel; Based on the highest credit limit corresponding to the target virtual channel, data transmission on the target virtual channel is controlled.

2. The data transmission control method according to claim 1, wherein determining the target parameters of the target virtual channel comprises: determining an actual round trip delay of a credit signal on a target virtual channel; The determining, based on the target parameter of the target virtual channel, a maximum credit limit corresponding to the target virtual channel includes: Based on the actual round-trip delay, a maximum credit limit corresponding to the target virtual channel is determined.

3. The data transmission control method according to claim 2, wherein determining the actual round-trip delay of the credit signal on the target virtual channel comprises: In response to satisfying the delay detection condition and detecting that the first routing node sends service data to the second routing node via the target virtual channel, determining the sending time of the service data as the start time of detecting the round-trip delay of the credit signal; In response to the first routing node receiving the target credit signal returned by the second routing node for the business data, the time when the first routing node receives the target credit signal is determined as the end time of the round-trip delay for detecting the credit signal, and the actual round-trip delay of the credit signal is determined based on the start time and end time.

4. The data transmission control method according to claim 3, wherein, in response to satisfying the delay detection condition and detecting that the first routing node sends service data to the second routing node via the target virtual channel, determining the sending time of the service data as the start time of detecting the round-trip delay of the credit signal comprises: In response to the first routing node sending service data to the second routing node via the target virtual channel and the first routing node is not currently in a round-trip delay statistics state for a credit signal, determining a sending time of the service data as a start time for detecting a round-trip delay for the credit signal; The first routing node receiving a target credit signal returned by the second routing node with respect to the service data includes: It is detected that the first routing node receives a credit signal returned by the second routing node, and the number of credit signals returned from the second routing node in the time period from the start time to the current time reaches a target number, where the target number is the credit limit used on the target virtual channel at the start time.

5. The data transmission control method according to any one of claims 2 to 4, wherein determining the maximum credit limit corresponding to the target virtual channel based on the actual round-trip delay comprises: Determining a maximum credit limit corresponding to the target virtual channel based on the actual round-trip delay and a benchmark credit limit corresponding to the target virtual channel; The reference credit limit is used to represent the maximum number of data packets allowed to be transmitted by the target virtual channel when the congestion state of the target virtual channel meets a set condition.

6. The data transmission control method according to claim 5, wherein determining the maximum credit limit corresponding to the target virtual channel based on the actual round-trip delay and the baseline credit limit corresponding to the target virtual channel comprises any one of the following: Determine a difference between twice the value of the reference credit limit and the number of clock cycles corresponding to the actual round-trip delay, and set the value of the maximum credit limit corresponding to the target virtual channel to the difference; Determine a maximum credit limit corresponding to the target virtual channel based on the actual round-trip delay and a benchmark round-trip delay and a benchmark credit limit corresponding to the target virtual channel, wherein if the actual round-trip delay is the same as the benchmark round-trip delay, determine the benchmark credit limit as the maximum credit limit corresponding to the target virtual channel; if the actual round-trip delay is greater than the benchmark round-trip delay, determine a maximum credit limit corresponding to the target virtual channel based on the difference between the actual round-trip delay and the benchmark round-trip delay and the benchmark credit limit, wherein the maximum credit limit is not less than 1; The benchmark round-trip delay is the time required for the first routing node to obtain the credit signal returned by the second routing node through the target virtual channel when the congestion status of the target virtual channel meets the set condition.

7. The data transmission control method according to claim 1, wherein determining target parameters of the target virtual channel comprises: In response to the first routing node sending service data to the second routing node via the target virtual channel and the parameter statistics period is not currently in progress, determining that a parameter statistics period has begun, and setting an initial value of a target parameter counter to a target value, where the target value is twice the base credit limit minus one; During the parameter statistics period, every time a clock cycle passes, the value of the target parameter counter is reduced by one; In response to the first routing node receiving a credit signal returned by the second routing node and the number of credit signals returned from the second routing node within the parameter statistical period reaching a target number, confirming that the parameter statistical period has ended, and determining the current count value of the target parameter counter as a target parameter; the target number is the credit limit used on the target virtual channel when entering the parameter statistical period; The reference credit limit is used to represent the maximum number of data packets allowed to be transmitted by the target virtual channel when the congestion state of the target virtual channel meets a set condition.

8. The data transmission control method according to claim 7, wherein determining the maximum credit limit corresponding to the target virtual channel based on the target parameter of the target virtual channel comprises: The value corresponding to the target parameter is set to the maximum credit limit corresponding to the target virtual channel.

9. The data transmission control method according to claim 1, wherein controlling the data transmission on the target virtual channel based on the maximum credit limit corresponding to the target virtual channel comprises: If the available credit limit corresponding to the target virtual channel at the current moment is greater than the maximum credit limit, setting the available credit limit corresponding to the target virtual channel to the maximum credit limit, and controlling data transmission on the target virtual channel based on the available credit limit; If the available credit limit corresponding to the target virtual channel at the current moment is less than the maximum credit limit, and the sum of the available credit limit and the used credit limit corresponding to the target virtual channel at the current moment is less than the maximum credit limit, the value of the available credit limit corresponding to the target virtual channel is set to the difference between the maximum credit limit and the used credit limit, and based on the available credit limit, the data transmission on the target virtual channel is controlled.

10. An electronic device comprising: at least two routing nodes and a physical channel between different routing nodes, wherein the physical channel between a first routing node and a second routing node is configured with at least two virtual channels, and the first routing node and the second routing node transmit data through the virtual channels, and the first routing node and the second routing node are any two routing nodes in the electronic device; The electronic device further includes: a transmission control module deployed on the first routing node or the second routing node; The transmission control module is configured to determine a target parameter of a target virtual channel, where the target parameter is used to characterize the congestion state of the target virtual channel, where the target virtual channel is one of at least two virtual channels established on a physical channel between a first routing node and a second routing node; determine a maximum credit limit corresponding to the target virtual channel based on the target parameter of the target virtual channel, where the maximum credit limit characterizes the maximum number of data packets allowed to be transmitted by the target virtual channel; and control data transmission on the target virtual channel based on the maximum credit limit corresponding to the target virtual channel.