Data packet routing method and device and computer equipment
By obtaining the congestion reference information of neighbor nodes and using direction information in the packet header in the on-chip interconnect network, intelligently routing data packets solves the problem that the XY routing algorithm cannot achieve optimal congestion control and traffic allocation when the network load is uneven, and realizes efficient packet transmission and optimized utilization of network resources.
Patent Information
- Application Number
- CN202510205708.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-24
- Publication Date
- 2025-05-23
AI Technical Summary
In an on-chip interconnect network with a two-dimensional mesh network structure, the XY routing algorithm cannot achieve optimal congestion control and traffic allocation when the network load is heavier or uneven.
By obtaining the congestion reference information corresponding to at least one link on the neighbor node, and combining the direction information in the data packet header, the target neighbor node is determined among multiple neighbor nodes, thereby realizing intelligent routing of data packets.
This method effectively prevents the data packet transmission detour phenomenon, realizes adaptive load balancing, avoids congestion, and achieves optimal traffic allocation.
Smart Images

Figure CN120034482A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a data packet routing method, device and computer equipment. Background Art
[0002] In the Network on Chip (NoC) with a two-dimensional mesh (2D Mesh) structure, the XY routing algorithm is a classic and commonly used routing strategy. When a data packet needs to be transmitted, it first moves along the X-axis until it reaches the column where the target node is located; then it moves along the Y-axis until it reaches the target node. This step-by-step routing strategy simplifies the complexity of path selection. Since routing decisions are made only based on the target address, there is no need to consider the current state of the network. When there is a heavy or uneven network load, optimal congestion control and traffic distribution cannot be achieved. Summary of the invention
[0003] In view of this, the present application provides a data packet routing method, apparatus and computer equipment to solve the problem that optimal congestion control and traffic distribution cannot be achieved when the network load is heavy or uneven.
[0004] In a first aspect, the present application provides a data packet routing method, which is applied to a first node, where the first node is any node in an on-chip interconnection network, and the method comprises: obtaining a data packet to be sent, where the data packet comprises a data packet header and data to be sent, wherein the data packet header carries direction information for indicating routing from the first node to a target node;
[0005] Confirm at least one directly connected neighbor node, and obtain at least one set of congestion reference information corresponding to at least one link on at least one neighbor node, wherein the congestion reference information indicates link congestion status of at least one link related to the first node and a neighbor node;
[0006] Determine a target neighbor node from at least one neighbor node according to at least one set of congestion reference information and direction information;
[0007] Route the data packet to the destination neighbor node.
[0008] The method provided in this aspect determines the target neighbor node among multiple neighbor nodes by obtaining at least one set of congestion reference information corresponding to at least one link on the neighbor node, and the direction information carried in the data packet, and sends the data packet to the target neighbor node. Compared with judging and selecting the target neighbor node of the next hop only by the link congestion level, this method refers to the direction information, which can effectively prevent the selected next hop node from transmitting data packets and taking a detour. In addition, after receiving the data packet sent by the previous hop device, each subsequent node determines the target neighbor node as the next hop device in the same way. This method realizes adaptive load balancing and completes the transmission process of transmitting the data packet from the source node to the target node. Congestion can be avoided during the transmission process, and optimal traffic distribution can be achieved.
[0009] In a second aspect, the present application provides a data packet routing device, the device comprising:
[0010] A first acquisition module, used to acquire a data packet to be sent, the data packet including a data packet header and data to be sent, wherein the data packet header carries direction information for indicating a route from the first node to the target node;
[0011] The second acquisition module is further used for the first node to confirm at least one directly connected neighbor node, and obtain at least one set of congestion reference information corresponding to at least one link on at least one neighbor node, wherein the congestion reference information indicates the link congestion status of at least one link related to the first node and a neighbor node;
[0012] A processing module, configured for the first node to determine a target neighbor node from at least one neighbor node according to at least one set of congestion reference information and direction information;
[0013] The routing module is used for the first node to route the data packet to the target neighbor node.
[0014] In a third aspect, the present application also provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, computer instructions are stored in the memory, and the processor executes the data packet routing method described in the first aspect by executing the computer instructions.
[0015] In a fourth aspect, the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein when the computer program is executed by a processor, the steps of the data packet routing method described in the first aspect are implemented.
[0016] In addition, the present application provides a computer program product, including computer instructions, which are used to enable a computer to execute the steps of the data packet routing method described in the first aspect above.
[0017] The present application provides a data packet routing method, device and apparatus, including the following beneficial effects:
[0018] Improve routing efficiency: This method can intelligently select links with lower congestion levels for data packet transmission by obtaining and considering the congestion reference information of neighboring nodes. This avoids data packets from being trapped in highly congested links, thereby reducing data packet transmission delays and improving the routing efficiency of the entire on-chip interconnect network.
[0019] Optimize resource utilization: By dynamically evaluating link congestion and selecting the optimal path, it helps balance the network load and avoid overloading of certain links or nodes due to excessive use. The optimization of resource allocation in this application helps improve the stability and reliability of the network and extend the service life of the hardware.
[0020] Enhanced network adaptability: As network traffic continues to change, link congestion will also change dynamically. This method obtains congestion reference information in real time and adjusts routing decisions accordingly, allowing the network to adapt to different traffic patterns, thereby improving the flexibility and adaptability of the network.
[0021] Reduced energy consumption: By reducing the waiting time and retransmission times of data packets in the network, it helps to reduce the energy consumption of the network. In addition, optimizing routing decisions can also reduce unnecessary link usage and node processing, further reducing overall energy consumption.
[0022] Improve system performance: The routing method provided in this application can significantly improve routing efficiency, optimize resource utilization, enhance network adaptability and reduce energy consumption, so it has a positive impact on improving the performance of the entire on-chip interconnect network and even the entire system. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0024] Figure 1 It is a flowchart of a data packet routing method provided by an embodiment of the present application;
[0025] Figure 2 It is a flowchart of another data packet routing method provided in an embodiment of the present application;
[0026] Figure 3 It is a flowchart of another data packet routing method provided in an embodiment of the present application;
[0027] Figure 4 It is a flowchart of another data packet routing method provided in an embodiment of the present application;
[0028] Figure 5 is a schematic diagram of a data packet transmission path provided in an embodiment of the present application;
[0029] Figure 6 is a schematic diagram of a task vector classification provided in an embodiment of the present application;
[0030] Figure 7 It is a structural block diagram of a data packet routing device provided in an embodiment of the present application;
[0031] Figure 8 is a structural block diagram of another data packet routing device provided in an embodiment of the present application;
[0032] Fig. 9 It is a schematic diagram of the hardware structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0033] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of this application.
[0034] It should be noted that, in the description of this application, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. The terms "first", "second", etc. in this application are used to distinguish similar objects, and are not used to describe a specific order or sequence.
[0035] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0036] In conjunction with the specific application environment architecture or the specific hardware architecture on which the execution of the data packet routing method depends, the specific application environment architecture or the specific hardware architecture is described herein.
[0037] The Network on Chip (NoC) is a key technology in the design of multi-core processors. It connects processor cores, memory and other hardware resources to achieve efficient and scalable on-chip communication. Unlike traditional buses or point-to-point connections, NoC uses switching technology to form a complex network structure through routers and links, which can provide higher bandwidth, lower latency, and better power management. Among the many NoC architectures, the 2DMesh structure is widely used in actual chip design due to its regularity and easy layout. The 2D Mesh structure of the NoC consists of multiple routers arranged in a grid form. Each router is connected to the surrounding routers through bidirectional links to form a regular grid network. This structure has simple routing logic and good space utilization.
[0038] In the NoC with 2D Mesh structure, the XY routing algorithm is a classic and commonly used routing strategy. When a data packet needs to be transmitted, it first moves along the X-axis until it reaches the column where the target node is located; then it moves along the Y-axis until it reaches the target node. This step-by-step routing strategy simplifies the complexity of path selection. Since the routing decision is made only based on the target address without considering the current state of the network, the implementation of the algorithm is extremely concise. At the same time, since the algorithm itself avoids loop paths, deadlock problems can be naturally avoided in the NoC with 2D Mesh structure. However, the XY routing algorithm also has its limitations. For example, when the network load is heavy or uneven, it cannot achieve optimal congestion control and traffic distribution.
[0039] To solve the above problems, an embodiment of the present application provides a data packet routing embodiment. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system (computer device) including a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0040] In this embodiment, a data packet routing method is provided. Figure 1 is a flow chart of a data packet routing method provided in an embodiment of the present application. The method can be applied to a first node, which is any node in an on-chip interconnection network, such as Figure 1 As shown, the process includes the following steps:
[0041] Step S101, obtaining a data packet to be sent, the data packet including a data packet header and data to be sent.
[0042] The data to be sent in the data packet may be carried by the data packet body, and the data packet header is used to store some configuration information, such as direction information indicating routing from the first node to the target node.
[0043] The first node is a source node that sends a data packet, and the target node is a destination node that needs to receive the data packet. There is a transmission path between the source node and the destination node, and each transmission path may include one or more intermediate nodes.
[0044] In addition, in this implementation, the above-mentioned direction information may not be carried in the data packet header, but a separate direction information may be sent by the controller, for example, the controller sends a message to the first node, and the message includes the direction information.
[0045] Optionally, the data packet header also includes address information of the source node and address information of the target node.
[0046] In a specific example, the direction information from the source node to the target node is generated by the controller, and the generation method may be: setting the NoC to a 2D Mesh structure, and determining the positions of the source node and the target node in the 2D Mesh structure according to the address information of the source node and the target node on the chip.
[0047] The coordinate system is established with the center of the 2D Mesh structure as the origin. The coordinates of the source node and the target node in the coordinate system are determined to be (Xa, Ya) and (Xb, Yb) respectively according to their positions in the 2D Mesh structure. The direction information is determined according to the coordinates of the source node and the target node in the coordinate system as ((Xb-Xa), (Yb-Ya)).
[0048] Step S102: confirm at least one directly connected neighbor node, and obtain at least one set of congestion reference information corresponding to at least one link on at least one neighbor node.
[0049] The congestion reference information indicates the link congestion status of at least one link related to the first node and a neighboring node.
[0050] Specifically, the first node can obtain the congestion reference information of the subsequent three links related to the neighbor node by directly calculating the congestion reference information of the link between the neighbor node and receiving the congestion reference information of the subsequent two links fed back by the neighbor node, and determine the link congestion status of the subsequent three links related to the first node and a neighbor node based on the congestion reference information.
[0051] Step S103: determining a target neighbor node from at least one neighbor node according to at least one set of congestion reference information and direction information.
[0052] Specifically, the first node may select a neighbor node that meets the direction of the direction information and has the lowest link congestion as the target neighbor node.
[0053] Step S104: routing the data packet to the target neighbor node.
[0054] The data packet routing method provided in this embodiment determines the target neighbor node among multiple neighbor nodes by obtaining at least one set of congestion reference information corresponding to at least one link on the neighbor node, and the direction information carried in the data packet, and sends the data packet to the target neighbor node. Compared with judging and selecting the target neighbor node of the next hop only by the link congestion degree, this method refers to the direction information, which can effectively prevent the selected next hop node from transmitting data packets and taking a detour. In addition, after receiving the data packet sent by the previous hop device, each subsequent node determines the target neighbor node as the next hop device in the same way. This method realizes adaptive load balancing and completes the transmission process of transmitting the data packet from the source node to the target node, and can avoid congestion during the transmission process and achieve optimal traffic distribution.
[0055] Based on the above implementation, the congestion reference information includes a congestion reference value, which is used to indicate the link congestion status of at least one link related to the first node and a neighboring node. Figure 2 As shown, in an optional implementation manner, the first node determines a target neighbor node from at least one neighbor node according to at least one set of congestion reference information and direction information, specifically including:
[0056] Step S201: determining a first candidate neighbor node from at least one neighbor node according to at least one set of congestion reference information.
[0057] The congestion reference information includes a congestion reference value. The first candidate neighbor node is a neighbor node corresponding to a minimum value in at least one set of congestion reference values.
[0058] Step S202: Determine the first candidate neighbor node as the target neighbor node according to the direction identifier and direction information of the route to the first candidate neighbor node and a first preset condition.
[0059] The first preset condition is that the direction identifier of the first node routed to the first candidate neighbor node matches the direction information.
[0060] Specifically, when the direction identifier belongs to the component vector direction of the direction information, it is determined that the direction identifier of the first node route to the first candidate neighbor node matches the direction information.
[0061] On the basis of the above-mentioned implementation mode, the above-mentioned step S202, according to the direction identifier, direction information, and the first preset condition of the route to the first candidate neighbor node, determines that the first candidate neighbor node is the target neighbor node, specifically includes:
[0062] Step a1: The first node obtains a direction identifier of its route to the first candidate neighbor node.
[0063] Specifically, in a coordinate system established with the center of the 2D Mesh structure as the origin, determine the coordinates (X c , Y c ), the coordinates of the first node are (X c , Y c-1 ), the direction of a node routing to the first candidate neighbor node is identified as (0, Y c -Y c-1 ).
[0064] Step a2: The first node determines whether the direction identifier and direction information of its route to the first candidate neighbor node meet a first preset condition.
[0065] In a specific example, if the direction of the component vector of the aforementioned direction information is (Xb-Xa, 0) or (0, Yb-Ya), when Y c -Y c-1 The positive and negative signs of Y b -Y a When they are consistent, the direction identifier and direction information of the first node routing to the first candidate neighbor node meet the first preset condition.
[0066] Step a3: If the first preset condition is met, determine the first candidate neighbor node as the target neighbor node.
[0067] Based on the foregoing implementation, a neighbor node corresponding to the minimum value in at least one set of congestion reference values is selected as a candidate neighbor node, and when the direction identifier of the first node routing to the candidate neighbor node matches the direction information, the candidate neighbor node is the target neighbor node.
[0068] In addition, when the direction identifier of the first node routing to the candidate neighbor node does not match the direction information, that is, when the first preset condition is not met, the above method is as follows: Figure 3 As shown, it also includes:
[0069] Step S301: If the first preset condition is not met, the detour number information is obtained.
[0070] Specifically, when the direction identifier of the first node routing to the candidate neighbor node does not match the direction information, the first node's behavior of transmitting the data packet to the candidate neighbor node is considered a detour, and the detour count information includes the current detour count and the allowed detour count.
[0071] The allowed detour times are configured by the controller according to certain rules when the data packet enters the NoC. When the first node needs to detour, it needs to send a request to the controller to instruct to obtain the current detour times and the allowed detour times.
[0072] Step S302: adding one to the current detour times and comparing it with the allowed detour times, and determining whether routing the data packet to the first candidate neighbor node meets a second preset condition according to the comparison result.
[0073] The second preset condition is that the current number of detours plus one is less than or equal to the allowed number of detours.
[0074] Step S303: If the second preset condition is met, determine the first candidate neighbor node as the target neighbor node.
[0075] Step S304: If the second preset condition is not met, determine a second candidate neighbor node from at least one neighbor node according to at least one set of congestion reference information.
[0076] The congestion reference value corresponding to the second candidate neighbor node is the second to last in the descending order of all reference values, and the second candidate neighbor node is the remaining candidate node after excluding the aforementioned first candidate neighbor node.
[0077] Specifically, when determining the second candidate neighbor node from at least one neighbor node according to at least one set of congestion reference information, at least one neighbor node excludes the first candidate neighbor node.
[0078] In another optional embodiment, in a specific embodiment, such as Figure 4 As shown, the method can be applied to a node, such as a first node, and the method includes:
[0079] Step S401, obtaining a data packet to be sent, direction information and detour number information.
[0080] The direction information is used to indicate the transmission direction from the first node to the target node, and the detour number information includes the current detour number and the allowed detour number.
[0081] Step S402, determining whether the current number of detours is less than the allowed number of detours.
[0082] Step S403: If the current detour times are equal to the allowed detour times, determine at least one set of congestion reference information corresponding to at least one link of at least one neighbor node matching the direction information according to the direction information.
[0083] Step S404, adding 1 to the current number of detours in the detour number information.
[0084] The congestion reference information indicates the link congestion status of at least one link related to the first node and a neighboring node.
[0085] Step S405: if the current detour times are less than the allowed detour times, determine a target neighbor node from at least one neighbor node according to at least one set of congestion reference information corresponding to at least one link on at least one neighbor node.
[0086] Specifically, if the current number of detours is less than the allowed number of detours, the first node calculates the congestion reference information corresponding to the subsequent preset number of links on the neighboring nodes in the other three directions except the direction of receiving the data packet, and selects the neighboring node corresponding to the smallest congestion reference value as the target neighboring node.
[0087] In a specific example, Figure 5 As shown, a11 is a source node. a11 obtains the data packet to be sent, direction information and detour number information, and a11 determines whether the current detour number is less than the allowed detour number.
[0088] If the current detour times are less than the allowed detour times, a11 calculates the congestion reference values corresponding to the subsequent three links of the four neighboring nodes a12, a22, a32, and a42.
[0089] If the current number of detours is equal to the number of detours allowed, such as Figure 5 As shown, a11 determines the vector information as rightward and downward according to the direction information from the source node to the target node, and a11 calculates the congestion reference values corresponding to the subsequent three links of the two neighbor nodes a22 and a42.
[0090] like Figure 4 As shown, the process also includes: step S406, routing the data packet to the target neighbor node.
[0091] Specifically, a neighbor node corresponding to the minimum congestion reference value is selected as a target neighbor node, and the data packet is routed to the target neighbor node.
[0092] Before the first node routes a data packet to a candidate neighbor node, it determines whether the number of allowed detours on the data packet transmission path is zero. When the number of allowed detours is zero, it selects the neighbor node with the lowest congestion reference value that matches the direction information as the target neighbor node. When the number of allowed detours is not zero, the first node calculates the congestion reference values in the other three directions except the data packet reception direction and selects the neighbor node with the smallest congestion reference value as the target neighbor node for routing. After subtracting one from the number of allowed detours on the data packet transmission path, the first node routes the data packet to the target neighbor node.
[0093] In an alternative embodiment, the number of allowed detours is configured for the first node by the controller according to certain rules when the data packet enters the NoC, such as Figure 6 shown, the configuration rule is:
[0094] Step b1, obtain the length and width parameters of the two-dimensional mesh network.
[0095] Step b2, determine the central region according to the length and width parameters of the two-dimensional mesh network and the pre-configured conditions for satisfying the central region.
[0096] Specifically, the preset nodes whose coordinates satisfy -n / 4 < X < n / 4 and -m / 4 < Y < m / 4 form the central region of the 2D Mesh interconnection network, where n and m are the length and width parameters of the 2D Mesh network.
[0097] Step b3, when the coordinates of the source node and the target node in the coordinate system both belong to the central region, determine the number of allowed detours during the process of the data packet being transmitted from the source node to the target node according to the number of interconnected links passed by the data packet from the source node to the target node.
[0098] Specifically, when both the source node and the destination node are in the central region and the transmission path is less than or equal to a preset value, the transmission path is shorter, and the number of allowed detours is set to 0, otherwise the number of allowed detours is set to 1. For example, as Figure 6 shown in ①, when the total number of hops of the transmission path is less than or equal to 3, the number of allowed detours is set to 0; as Figure 6 shown in ②, when the total number of hops of the transmission path is greater than 3, the detour limit number is set to 1.
[0099] Among them, the method for determining the total number of hops of the transmission path is (Xb - Xa) + (Yb - Ya).
[0100] Step b4, when the coordinates of the source node or the target node in the coordinate system belong to the central region, determine the number of allowed detours during the process of the data packet being transmitted from the source node to the first target node according to whether the positive and negative signs corresponding to the abscissa or ordinate of the source node and the first target node are the same and / or opposite.
[0101] Specifically, when the source node or the destination node is located within the central region, such as Figure 6 shown in ③ in the figure, when Xb and Xa have opposite signs and Yb and Ya have opposite signs, the restricted detour count is set to 2; as shown in ④ in the figure, when Xb and Xa have opposite signs or Yb and Ya have opposite signs, the restricted detour count is set to 1; as shown in ⑤ in the figure, when Xb and Xa have the same sign and Yb and Ya have the same sign, that is, the task vector is within the same quadrant, the restricted detour count is set to 0.
[0102] Step b5, when the coordinates of the source node and the destination node in the coordinate system do not belong to the central region, determine the allowed detour count during the transmission of the data packet from the source node to the destination node according to the positive and negative signs corresponding to the abscissa or ordinate of the source node and the first destination node, and the condition between the sum of the absolute values of the abscissa or ordinate and the length and width parameters of the two-dimensional mesh network.
[0103] Specifically, when the coordinates of the source node and the destination node in the coordinate system do not belong to the central region, such as Figure 6 shown in ⑥ in the figure, when |Xb| + |Xa| < n / 2 and Yb and Ya have opposite signs, or |Yb| + |Ya| < m / 2 and Xb and Xa have opposite signs, it is set to 1; in other cases except the above, it is set to 0.
[0104] In addition, when the source node or the destination node is located on the X(Y) coordinate axis, its X(Y) coordinate is processed as a positive value.
[0105] Among them, the first node first needs to determine the link with the lightest congestion among at least one neighbor node according to at least one set of congestion reference information. In an optional example, the method for obtaining at least one set of congestion reference information corresponding to at least one link on at least one neighbor node includes:
[0106] Step c1, the first node respectively obtains the first congestion reference value of the first link related to the first neighbor node, the second congestion reference value of the second link related to the first neighbor node, and the third congestion reference value of the third link related to the first neighbor node.
[0107] Step c2, the first node determines the congestion reference information according to the first congestion reference value, the second congestion reference value and the third congestion reference value.
[0108] In an optional example, the method for obtaining the first congestion reference value of the first link related to the first neighbor node includes:
[0109] Step d1, the first node obtains the credit value of the link with the first neighbor node.
[0110] Step d2, calculating the ratio between the total credit value of the link between the first node and the first neighboring node and the used credit value of the link between the first node and the first neighboring node, and using the ratio as a first congestion reference value.
[0111] In an optional example, the first node obtains a second reference value of a second link related to the first neighboring node, including:
[0112] Step e1: The first node sends a request to the first neighboring node.
[0113] The request is used to instruct the first neighboring node to calculate a second congestion reference value for the second link, receive a third congestion reference value for the third link, and feed back a response.
[0114] Specifically, the third congestion reference value of the third link is obtained by the neighbor node of the first neighbor node obtaining the credit value of the third link, and then feeding back the ratio between the total credit value and the used credit value of the third link to the first neighbor node as the third congestion reference value.
[0115] Step e2: The first node receives a response message fed back by the first neighboring node, where the response message includes a second congestion reference value and a third congestion reference value.
[0116] In an optional implementation manner, the first node determines congestion reference information according to the first congestion reference value, the second congestion reference value, and the third congestion reference value, including:
[0117] The first node calculates the first congestion reference value, the second congestion reference value, and the third congestion reference value using a preset relationship to obtain congestion reference information. The preset relationship is:
[0118]
[0119] Among them, α, β, γ are weighted coefficients, and α+β+γ=1, L is the congestion reference information, is the first congestion reference value, C 1U is the used credit value of the link between the first node and the first neighbor node, C 1T is the total credit value of the link between the first node and the first neighbor node, is the second congestion reference value, and J is the third congestion reference value.
[0120] The third congestion reference value of the third link is calculated by neighbor nodes of the first neighbor node respectively obtaining the credit value of the third link. In an optional implementation manner, the preset relationship for determining the third congestion reference value may also be:
[0121]
[0122] in, is the sum of the credit values used in the links of the neighboring nodes of the first neighboring node in three directions, It is the sum of the total credit values of the links in three directions of the neighboring nodes of the first neighboring node.
[0123] Specifically, by using the sum of the congestion reference values of the links in three directions of the first neighboring node instead of the three congestion reference values, the calculation amount of the first node is reduced.
[0124] A data packet routing method provided in this embodiment has the following beneficial effects:
[0125] Improve routing efficiency: This method can intelligently select links with lower congestion levels for data packet transmission by obtaining and considering the congestion reference information of neighboring nodes. This avoids data packets from being trapped in highly congested links, thereby reducing data packet transmission delays and improving the routing efficiency of the entire on-chip interconnect network.
[0126] Optimize resource utilization: By dynamically evaluating link congestion and selecting the optimal path, it helps balance the network load and avoid overloading of certain links or nodes due to excessive use. The optimization of resource allocation in this application helps improve the stability and reliability of the network and extend the service life of the hardware.
[0127] Enhanced network adaptability: As network traffic continues to change, link congestion will also change dynamically. This method obtains congestion reference information in real time and adjusts routing decisions accordingly, allowing the network to adapt to different traffic patterns, thereby improving the flexibility and adaptability of the network.
[0128] Reduced energy consumption: By reducing the waiting time and retransmission times of data packets in the network, it helps to reduce the energy consumption of the network. In addition, optimizing routing decisions can also reduce unnecessary link usage and node processing, further reducing overall energy consumption.
[0129] Improve system performance: The routing method provided in this application can significantly improve routing efficiency, optimize resource utilization, enhance network adaptability and reduce energy consumption, so it has a positive impact on improving the performance of the entire on-chip interconnect network and even the entire system.
[0130] In this embodiment, a data packet routing device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0131] This embodiment provides a data packet routing device having the function of executing the above-mentioned Figure 1 The method flow shown is as follows: Figure 7 As shown, the device includes: a first acquisition module 701, a second acquisition module 702, a processing module 703 and a routing module 704. In addition, the device may also include other more or fewer modules, such as a storage module, etc., which is not limited in this embodiment.
[0132] The first acquisition module 701 is used to acquire the data packet to be sent and direction information, where the direction information is used to indicate the transmission direction from the router to the target node.
[0133] The second acquisition module 702 is further used to confirm at least one directly connected neighbor node and obtain at least one set of congestion reference information corresponding to at least one link on at least one neighbor node, wherein the congestion reference information indicates the link congestion status of at least one link related to a neighbor node.
[0134] The processing module 703 is used to determine a target neighbor node from at least one neighbor node according to at least one set of congestion reference information and direction information.
[0135] The routing module 704 is used to route the data packet to the target neighbor node.
[0136] In an optional implementation, the processing module 703 is further configured to determine a first candidate neighbor node from at least one neighbor node according to at least one set of congestion reference information, and determine the first candidate neighbor node as the target neighbor node according to a direction identifier and direction information routed to the first candidate neighbor node, and a first preset condition. The first preset condition is that the direction identifier and direction information routed to the first candidate neighbor node match.
[0137] In an optional embodiment, if Figure 8 As shown, the above device also includes: a determination module 705, a request module 706 and a receiving module 707.
[0138] The first acquisition module 701 is further configured to acquire a direction identifier of its route to the first candidate neighbor node.
[0139] The processing module 703 is further configured to determine whether the direction identifier and direction information of the route to the first candidate neighbor node meet a first preset condition.
[0140] The determination module 705 is configured to determine the first candidate neighbor node as a target neighbor node if a first preset condition is met.
[0141] In an optional implementation, the first acquisition module 701 is further configured to acquire detour number information if the first preset condition is not met, wherein the detour number information includes the current detour number and the allowed detour number.
[0142] The processing module 703 is also used to compare the current number of detours plus one with the allowed number of detours, and determine whether routing the data packet to the first candidate neighbor node meets the second preset condition based on the comparison result, wherein the second preset condition is that the current number of detours plus one is less than or equal to the allowed number of detours.
[0143] The determination module 705 is also used to determine that the first candidate neighbor node is the target neighbor node if the second preset condition is met; if the second preset condition is not met, determine the second candidate neighbor node from at least one neighbor node based on at least one set of congestion reference information, and the congestion reference value corresponding to the second candidate neighbor node is the second to last in the order of all reference values sorted from large to small.
[0144] In an optional embodiment, the second acquisition module 702 is further used to respectively acquire a first congestion reference value of a first link related to the first neighbor node, a second congestion reference value of a second link related to the first neighbor node, and a third congestion reference value of a third link related to the first neighbor node; and determine congestion reference information based on the first congestion reference value, the second congestion reference value and the third congestion reference value.
[0145] In an optional implementation, the first acquisition module 701 is further configured to acquire a credit value of a link with the first neighboring node.
[0146] The processing module 703 is further configured to calculate a ratio between a total credit value of a link with the first neighboring node and a used credit value of a link with the first neighboring node, and use the ratio as a first congestion reference value.
[0147] In an optional implementation, the request module 706 is used to send a request to the first neighboring node, where the request is used to instruct the first neighboring node to calculate a second congestion reference value for the second link, receive a third congestion reference value for the third link, and feed back a response.
[0148] The receiving module 707 is configured to receive a response message fed back by the first neighboring node, where the response message includes a second congestion reference value and a third congestion reference value.
[0149] In an optional implementation, the second acquisition module 702 is further configured to calculate the first congestion reference value, the second congestion reference value, and the third congestion reference value using a preset relationship to obtain congestion reference information, where the preset relationship is:
[0150]
[0151] Among them, α, β, γ are weighted coefficients, and α+β+γ=1, L is the congestion reference information, is the first congestion reference value, C1U is the used credit value of the link with the first neighbor node, C 1T is the total credit value of the link with the first neighbor node, is the second congestion reference value, and J is the third congestion reference value.
[0152] The data packet routing device in this embodiment is presented in the form of a functional module, where the module refers to an application specific integrated circuit (ASIC), a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0153] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0154] The embodiment of the present application provides a data packet routing device, in which a node obtains at least one set of congestion reference information corresponding to at least one link on a neighboring node, determines the direction of the next forwarding of a data packet, and then determines the target neighboring node to receive the data packet based on the transmission direction information routed from the source node to the target node. This avoids the detour problem caused by the actual routing direction of the first node relying only on the congestion reference information being opposite to the location of the target node, and also prevents the problem of relying only on direction information and ignoring the link congestion status. Each subsequent node that obtains the data packet automatically determines the target neighboring node for the next transmission from at least one neighboring node according to the above rules, realizes adaptive load balancing, and completes the congestion control and traffic distribution of the data packet from the source node to the target node.
[0155] The embodiment of the present application also provides a computer device, such as Fig. 9 As shown, it includes: one or more processors 10, a memory 20 and at least one communication interface 30, as well as interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses for communication, and can be installed on a common motherboard or in other ways as needed. The processor can process instructions executed in the manager, including instructions stored in or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface).
[0156] The memory 20 stores a computer program, and the processor 10 is configured to run the computer program to execute the steps in any of the above-mentioned data packet routing method embodiments.
[0157] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of an embodiment of a data packet routing method in the above embodiment when running.
[0158] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0159] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any of the above-mentioned data packet routing method embodiments are implemented.
[0160] An embodiment of the present application also provides another computer program product, including a non-volatile computer-readable storage medium, the non-volatile computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the steps in any of the above-mentioned data packet routing method embodiments are implemented.
[0161] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
Claims
1. A data packet routing method, characterized in that: Applied to a first node, the first node being any node in an on-chip interconnect network, the method comprises: Acquire a data packet to be sent, the data packet including a data packet header and data to be sent, wherein the data packet header carries direction information for indicating a route from the first node to the target node; Confirm at least one directly connected neighbor node, and obtain at least one set of congestion reference information corresponding to at least one link on the at least one neighbor node, wherein the congestion reference information indicates link congestion status of at least one link related to the first node and a neighbor node; Determine a target neighbor node among the at least one neighbor node according to the at least one set of congestion reference information and the direction information; The data packet is routed to the target neighbor node.
2. The method according to claim 1, characterized in that The congestion reference information includes a congestion reference value; Determining a target neighbor node from the at least one neighbor node according to at least one set of the congestion reference information and the direction information includes: Determine a first candidate neighbor node from the at least one neighbor node according to the at least one set of congestion reference information, where the first candidate neighbor node is a neighbor node corresponding to a minimum value in the at least one set of congestion reference values; The first candidate neighbor node is determined to be the target neighbor node based on the direction identifier routed to the first candidate neighbor node, the direction information, and a first preset condition, wherein the first preset condition is that the direction identifier routed from the first node to the first candidate neighbor node matches the direction information.
3. The method according to claim 2, characterized in that Determining the first candidate neighbor node as a target neighbor node according to a direction identifier routed to the first candidate neighbor node, the direction information, and a first preset condition includes: Obtaining a direction identifier of its route to the first candidate neighbor node; Determining whether the direction identifier and the direction information meet the first preset condition; If the first preset condition is met, the first candidate neighbor node is determined to be the target neighbor node.
4. The method according to claim 3, characterized in that Determining whether the direction identifier and the direction information meet the first preset condition further includes: If the first preset condition is not met, obtaining detour number information, wherein the detour number information includes the current detour number and the allowed detour number; Add one to the current detour count and compare it with the allowed detour count, and determine whether routing the data packet to the first candidate neighbor node meets a second preset condition according to the comparison result, wherein the second preset condition is that the current detour count plus one is less than or equal to the allowed detour count; If the second preset condition is met, determining the first candidate neighbor node as the target neighbor node; If the second preset condition is not met, a second candidate neighbor node is determined from at least one neighbor node according to the at least one set of congestion reference information, and the congestion reference value corresponding to the second candidate neighbor node is second to last in the order of all reference values sorted from large to small.
5. The method according to claim 2, characterized in that: The obtaining at least one set of congestion reference information corresponding to at least one link on at least one neighboring node includes: Respectively acquiring a first congestion reference value of a first link related to a first neighboring node, a second congestion reference value of a second link related to the first neighboring node, and a third congestion reference value of a third link related to the first neighboring node; The congestion reference information is determined according to the first congestion reference value, the second congestion reference value, and the third congestion reference value.
6. The method according to claim 5, characterized in that The obtaining a first congestion reference value of a first link related to a first neighboring node includes: Acquire a credit value of a link between the first neighbor node and the first neighbor node; A ratio between a total credit value of a link between the first node and the first neighboring node and a used credit value of a link between the first node and the first neighboring node is calculated, and the ratio is used as the first congestion reference value.
7. The method according to claim 5, characterized in that The acquiring a second reference value of a second link related to the first neighboring node includes: Sending a request to the first neighboring node, the request being used to instruct the first neighboring node to calculate a second congestion reference value of the second link, and to receive a third congestion reference value of the third link, and to feed back a response; A response message fed back by the first neighboring node is received, where the response message includes a second congestion reference value and a third congestion reference value.
8. The method according to claim 6, characterized in that The determining the congestion reference information according to the first congestion reference value, the second congestion reference value, and the third congestion reference value includes: The first congestion reference value, the second congestion reference value, and the third congestion reference value are calculated using a preset relationship to obtain the congestion reference information, where the preset relationship is: Among them, α, β, γ are weighted coefficients, and α+β+γ=1, L is the congestion reference information, is the first congestion reference value, C 1U is the used credit value of the link between the first node and the first neighbor node, C 1T is the total credit value of the link between the first node and the first neighbor node, is the second congestion reference value, and J is the third congestion reference value.
9. A data packet routing device, characterized in that: The device comprises: A first acquisition module, used to acquire a data packet to be sent, wherein the data packet includes a data packet header and data to be sent, wherein the data packet header carries direction information indicating a route from the first node to the target node; The second acquisition module is further used to confirm at least one directly connected neighbor node, and obtain at least one set of congestion reference information corresponding to at least one link on at least one of the neighbor nodes, wherein the congestion reference information indicates the link congestion status of at least one link related to the first node and a neighbor node; A processing module, configured to determine a target neighbor node from among the at least one neighbor node according to the at least one set of congestion reference information and the direction information; A routing module is used to route the data packet to the target neighbor node.
10. A computer device, characterized in that: including memory and processor; The memory is used to store computer programs; The processor is used to implement the steps of the data packet routing method according to any one of claims 1 to 8 when executing the computer program.
Citation Information
Cited By
Data routing method and device, electronic equipment, storage medium and program product
CN121585604A