Routing method and device of dual-path Torus network, chip, equipment and storage medium
By adopting a dual-path routing method in the Torus network to determine the routing path of data packets, the deadlock problem is solved and network performance and reliability are improved.
Patent Information
- Application Number
- CN202410931754.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-11
- Publication Date
- 2024-10-01
AI Technical Summary
Due to the existence of more closed-loop phenomena in the Torus network, deadlocks are more likely to occur, affecting data transmission efficiency.
The routing method of the dual-path Torus network is adopted. By determining the coordinate difference and routing indication coordinates of the source routing node and the destination routing node of the target data packet, the shortest non-closed loop routing path is determined according to the preset routing rules to avoid deadlock.
It effectively avoids the deadlock problem in the Torus network, ensures the shortest path for data packet transmission, and improves network performance and reliability.
Smart Images

Figure CN118740724A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present application relate to the technical field of data processing, and in particular, to a routing method, apparatus, chip, device, and storage medium for a dual-path Torus network. Background Art
[0002] Network-on-chip (NoC) is a new communication method for system-on-chip (SoC). Torus network is an improved network-on-chip based on Mesh network.
[0003] In the Torus network, the routing nodes on both sides of the network's square topology are connected using links in the horizontal and vertical directions, shortening the network's diameter and reducing network transmission latency and power consumption.
[0004] However, the Torus network structure has more "closed loops" than the Mesh network, and is more prone to deadlock. Deadlock refers to a blocking phenomenon caused by competition for resources or communication between two or more processes during execution. Summary of the invention
[0005] The embodiments of the present application provide a routing method, apparatus, chip, device and storage medium for a dual-path Torus network, aiming to provide a routing method for avoiding deadlock in a Torus network.
[0006] In a first aspect, an embodiment of the present application provides a routing method for a dual-path Torus network, which is applied to a dual-path Torus network, wherein there are dual-path links between routing nodes in the dual-path Torus network, and the method includes:
[0007] In response to the current routing request, determining the coordinates of the source routing node and the coordinates of the target routing node where the target data packet is located;
[0008] Determine a coordinate difference and a routing indication coordinate according to the coordinates of the source routing node and the coordinates of the target routing node;
[0009] Determine the target routing path corresponding to the target data packet according to the coordinate difference and the routing indication coordinates and the preset routing rules;
[0010] Among them, the preset routing rules are used to determine the routing direction of the target data packet according to the routing indication coordinates, and to determine the transmission channel of the target data packet in the dual-path link according to the coordinate difference, so as to determine the shortest non-closed-loop routing path from the source routing node to the target routing node corresponding to the target data packet.
[0011] Optionally, determining a target routing path corresponding to the target data packet according to the coordinate difference and the routing indication coordinates and a preset routing rule includes:
[0012] When the absolute value of the abscissa of the routing indication coordinate is 1 and the ordinate is 0, or when the abscissa of the routing indication coordinate is 0 and the absolute value of the ordinate is 1, executing a first routing rule to determine a target routing path corresponding to the target data packet, wherein the first routing rule is used to make the target routing path shortest;
[0013] The first routing rule includes:
[0014] When the horizontal coordinate of the routing indication coordinate is greater than 0, the first west-east transmission channel or the second west-east transmission channel along the positive direction of the X-axis is selected as the transmission channel of the target routing path;
[0015] When the horizontal coordinate of the routing indication coordinate is less than 0, the first east-west transmission channel or the second east-west transmission channel along the negative direction of the X-axis is selected as the transmission channel of the target routing path;
[0016] When the ordinate of the routing indication coordinate is greater than 0, the first north-south transmission channel or the second north-south transmission channel along the positive direction of the Y axis is selected as the transmission channel of the target routing path;
[0017] When the ordinate of the routing indication coordinate is less than 0, the first north-south transmission channel or the second north-south transmission channel along the negative direction of the Y axis is selected as the transmission channel of the target routing path.
[0018] Optionally, determining a target routing path corresponding to the target data packet according to the coordinate difference and the routing indication coordinates and a preset routing rule includes:
[0019] When both the horizontal coordinate and the vertical coordinate of the route indication coordinate are not 0, any of the following is performed:
[0020] Prioritize the X-axis direction routing and execute the second routing rule;
[0021] Prioritize the Y-axis direction routing and execute the third routing rule;
[0022] Select the redirect route and execute the fourth routing rule.
[0023] Optionally, determining a target routing path corresponding to the target data packet according to the coordinate difference and the routing indication coordinates and a preset routing rule includes:
[0024] When the abscissa of the routing indication coordinate is not equal to 0 and the ordinate is equal to 0, the second routing rule is executed.
[0025] Optionally, determining a target routing path corresponding to the target data packet according to the coordinate difference and the routing indication coordinates and a preset routing rule includes:
[0026] When the abscissa of the routing indication coordinate is equal to 0 and the ordinate is not equal to 0, the third routing rule is executed.
[0027] Optionally, executing the second routing rule includes:
[0028] When the abscissa of the routing indication coordinate is greater than 0 and the abscissa difference of the coordinate difference is greater than 0, selecting a first west-east transmission channel from the source routing node along the positive direction of the X-axis to send the target data packet;
[0029] When routing along the X-axis direction, if the edge routing node of the dual-path Torus network is not crossed, the first east-west transmission channel for sending the target data packet is not changed;
[0030] When routing along the X-axis direction, if crossing the edge routing node of the dual-path Torus network, the first west-east transmission channel for sending the target data packet is changed to the second west-east transmission channel.
[0031] Optionally, executing the second routing rule includes:
[0032] When the abscissa of the routing indication coordinate is greater than 0 and the abscissa difference of the coordinate difference is less than 0, the target data packet is sent from the source routing node along the second east-west transmission channel in the positive direction of the X-axis.
[0033] Optionally, executing the second routing rule includes:
[0034] When the abscissa of the routing indication coordinate is less than 0 and the abscissa difference of the coordinate difference is less than 0, selecting a first east-west transmission channel from the source routing node along the negative direction of the X-axis to send the target data packet;
[0035] When routing along the X-axis direction, if the edge routing node of the dual-path Torus network is not crossed, the first east-west transmission channel for sending the target data packet is not changed;
[0036] When routing along the X-axis direction, if crossing the edge routing node of the dual-path Torus network, the first east-west transmission channel for sending the target data packet is changed to the second east-west transmission channel.
[0037] Optionally, executing the second routing rule includes:
[0038] When the abscissa of the routing indication coordinate is less than 0 and the abscissa difference of the coordinate difference is greater than 0, the target data packet is sent through a second east-west transmission channel from the source routing node along the negative direction of the X-axis.
[0039] Optionally, executing a third routing rule includes:
[0040] When the ordinate of the routing indication coordinate is greater than 0 and the ordinate difference of the coordinate difference is greater than 0, selecting a first north-south transmission channel along the positive direction of the Y axis from the source routing node to send the target data packet;
[0041] When routing along the Y-axis direction, if the edge routing node of the dual-path Torus network is not crossed, the first north-south transmission channel for sending the target data packet is not changed;
[0042] When routing along the Y-axis direction, if crossing the edge routing node of the dual-path Torus network, the first north-south transmission channel for sending the target data packet is changed to the second north-south transmission channel.
[0043] Optionally, executing a third routing rule includes:
[0044] When the ordinate of the routing indication coordinate is greater than 0 and the ordinate difference of the coordinate difference is less than 0, the target data packet is sent through a second north-south transmission channel from the source routing node along the positive direction of the Y axis.
[0045] Optionally, executing a third routing rule includes:
[0046] When the ordinate of the routing indication coordinate is less than 0 and the ordinate difference of the coordinate difference is less than 0, selecting a first north-south transmission channel along the negative direction of the Y axis from the source routing node to send the target data packet;
[0047] When routing along the Y-axis direction, if the edge routing node of the dual-path Torus network is not crossed, the first north-south transmission channel for sending the target data packet is not changed;
[0048] When routing along the Y-axis direction, if crossing the edge routing node of the dual-path Torus network, the first north-south transmission channel for sending the target data packet is changed to the second north-south transmission channel.
[0049] Optionally, executing a third routing rule includes:
[0050] When the ordinate of the routing indication coordinate is less than 0 and the ordinate difference of the coordinate difference is greater than 0, the target data packet is sent through a second north-south transmission channel from the source routing node along the negative direction of the Y axis.
[0051] Optionally, for any routing node in the target routing path, selecting a redirection route and executing a fourth routing rule includes:
[0052] If at the routing node, the transmission direction of the target data packet changes from the positive direction of the X-axis to the positive direction of the Y-axis, the target data packet transmitted based on the first west-east transmission channel selects the first north-south transmission channel for transmission, and the target data packet transmitted based on the second west-east transmission channel selects the second north-south transmission channel for transmission;
[0053] If at the routing node, the transmission direction of the target data packet changes from the negative direction of the X-axis to the negative direction of the Y-axis, the target data packet transmitted based on the first east-west transmission channel selects the first north-south transmission channel for transmission, and the target data packet transmitted based on the second east-west transmission channel selects the second north-south transmission channel for transmission;
[0054] If at the routing node, the transmission direction of the target data packet changes from the positive direction of the Y axis to the positive direction of the X axis, the target data packet transmitted based on the first north-south transmission channel selects the first west-east transmission channel for transmission, and the target data packet transmitted based on the second north-south transmission channel selects the second west-east transmission channel for transmission;
[0055] If at the routing node, the transmission direction of the target data packet changes from the negative direction of the Y axis to the negative direction of the X axis, the target data packet transmitted based on the first north-south transmission channel selects the first east-west transmission channel for transmission, and the target data packet transmitted based on the second north-south transmission channel selects the second east-west transmission channel for transmission;
[0056] If at the routing node, the transmission direction of the target data packet changes from the positive direction along the X-axis to the negative direction along the Y-axis, the target data packet transmitted based on the first west-east transmission channel selects the second north-south transmission channel for transmission, and the target data packet transmitted based on the second west-east transmission channel selects the first north-south transmission channel for transmission;
[0057] If at the routing node, the transmission direction of the target data packet changes from the negative direction of the X-axis to the positive direction of the Y-axis, the target data packet transmitted based on the first east-west transmission channel selects the first north-south transmission channel for transmission, and the target data packet transmitted based on the second east-west transmission channel selects the second north-south transmission channel for transmission;
[0058] If at the routing node, the transmission direction of the target data packet changes from the positive direction along the Y axis to the negative direction along the X axis, the target data packet transmitted based on the first north-south transmission channel selects the second east-west transmission channel for transmission, and the target data packet transmitted based on the second north-south transmission channel selects the first east-west transmission channel for transmission;
[0059] If at the routing node, the transmission direction of the target data packet changes from the negative direction of the Y-axis to the positive direction of the X-axis, the target data packet transmitted based on the first north-south transmission channel selects the first west-east transmission channel for transmission, and the target data packet transmitted based on the second north-south transmission channel selects the second west-east transmission channel for transmission.
[0060] Optionally, after determining the target routing path corresponding to the target data packet according to the coordinate difference and the routing indication coordinates and a preset routing rule, the method further includes:
[0061] When multiple target routing paths are determined, the target routing path with the smallest current occupancy of routing nodes is selected as the final routing path corresponding to the target data packet;
[0062] The target data packet is sent along the final routing path.
[0063] Optionally, after determining the target routing path corresponding to the target data packet according to the coordinate difference and the routing indication coordinates and a preset routing rule, the method further includes:
[0064] Sending the target data packet from the source routing node to the next routing node according to the target routing path, wherein, when there are multiple next routing nodes, the routing node with the smallest current occupancy is used as the next routing node to which the target data packet is sent;
[0065] Using the next routing node as the updated source routing node;
[0066] The routing path of the target data packet is determined in real time according to the updated coordinates of the source routing node and the coordinates of the target routing node.
[0067] Optionally, before determining the coordinates of the source routing node and the coordinates of the target routing node where the target data packet is located in response to the current routing request, the method further includes:
[0068] Constructing a coordinate system for the topological structure of the dual-path Torus network, determining the coordinates corresponding to each routing node in the dual-path Torus network, wherein the horizontal coordinate and the vertical coordinate corresponding to each routing node are both greater than or equal to 0;
[0069] For any routing node, the two channels for transmission along the positive direction of the X-axis are recorded as the first west-east transmission channel and the second west-east transmission channel, the two channels for transmission along the negative direction of the X-axis are recorded as the first east-west transmission channel and the second east-west transmission channel, the two channels for transmission along the positive direction of the Y-axis are recorded as the first north-south transmission channel and the second north-south transmission channel, and the two channels for transmission along the negative direction of the Y-axis are recorded as the first north-south transmission channel and the second north-south transmission channel.
[0070] Optionally, determining a coordinate difference according to the coordinates of the source routing node and the coordinates of the target routing node includes:
[0071] Taking the difference between the abscissa of the target routing node and the abscissa of the source routing node as the abscissa difference;
[0072] Taking the difference between the ordinate of the target routing node and the ordinate of the source routing node as the ordinate difference;
[0073] The calculation formula of the coordinate difference is:
[0074] (Δx,Δy)=(x D ,y D )-(x S ,y S )
[0075] =(x D -x S ,y D -y S )
[0076] Wherein, Δx is the horizontal coordinate difference, Δy is the vertical coordinate difference, (Δx, Δy) is the coordinate difference, (x D ,y D ) is the coordinate of the target routing node; (x S , S S ) are the coordinates of the source routing node.
[0077] Optionally, determining the routing indication coordinates according to the coordinates of the source routing node and the coordinates of the target routing node includes:
[0078] When the abscissa difference of the coordinate difference is less than N / 2, the abscissa of the route indication coordinate is the abscissa difference;
[0079] When the abscissa difference of the coordinate difference is greater than or equal to N / 2, the abscissa of the route indication coordinate is obtained according to N and the abscissa difference;
[0080] When the ordinate difference of the coordinate difference is less than N / 2, the ordinate of the route indication coordinate is the ordinate difference;
[0081] When the ordinate difference of the coordinate difference is greater than or equal to N / 2, the ordinate of the route indication coordinate is obtained according to N and the ordinate difference;
[0082] The calculation formula of the routing indication coordinates is:
[0083]
[0084] Wherein, Δx is the horizontal coordinate difference, Δy is the vertical coordinate difference, and N is the number of routing nodes in the horizontal direction or the vertical direction in the topological structure of the dual-path Torus network.
[0085] In a second aspect, an embodiment of the present application provides a routing device of a dual-path Torus network, which is applied to a dual-path Torus network, wherein there are dual-path links between routing nodes in the dual-path Torus network, and the device includes:
[0086] A coordinate determination module, used to determine the coordinates of the source routing node and the coordinates of the target routing node where the target data packet is located in response to the current routing request;
[0087] A calculation module, used to determine a coordinate difference and a routing indication coordinate according to the coordinates of the source routing node and the coordinates of the target routing node;
[0088] A target routing path determination module, used to determine the target routing path corresponding to the target data packet according to the coordinate difference and the routing indication coordinates and a preset routing rule;
[0089] Among them, the preset routing rules are used to determine the routing direction of the target data packet according to the routing indication coordinates, and to determine the transmission channel of the target data packet in the dual-path link according to the coordinate difference, so as to determine the shortest non-closed-loop routing path from the source routing node to the target routing node corresponding to the target data packet.
[0090] In a third aspect, an embodiment of the present application provides a server switching chip, on which a dual-path Torus network is arranged, and the chip is used to execute the routing method of the dual-path Torus network described in the first aspect of the embodiment.
[0091] In a fourth aspect, an embodiment of the present application provides a computing and processing device, including:
[0092] A memory storing a computer-readable code; and one or more processors. When the computer-readable code is executed by the one or more processors, the computing and processing device executes the routing method of the dual-path Torus network described in the first aspect of the embodiment.
[0093] In a fifth aspect, an embodiment of the present application provides a non-volatile readable storage medium, wherein the non-volatile readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the routing method of the dual-path Torus network described in the first aspect of the embodiment is executed.
[0094] Beneficial effects:
[0095] When sending a target data packet in a dual-path Torus network, in response to a current routing request, the coordinates of the source routing node and the target routing node where the target data packet is located are determined, and then the coordinate difference and the routing indication coordinates are determined based on the coordinate difference and the routing indication coordinates, and the target routing path corresponding to the target data packet is determined according to the preset routing rules.
[0096] The method calculates the coordinate difference and the routing indication coordinates, then determines the routing direction of the target data packet according to the routing indication coordinates, determines the transmission channel of the target data packet in the dual-path link according to the coordinate difference, and determines the target routing path of the target data packet according to the preset routing rules. The target routing path corresponding to the target data packet can be made the shortest routing path free from deadlock, thereby solving the deadlock problem in the Torus network. BRIEF DESCRIPTION OF THE DRAWINGS
[0097] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below.
[0098] Figure 1 A schematic diagram of the topological structure of an existing two-dimensional on-chip network is shown;
[0099] Figure 2 A schematic diagram of the structure of the existing Torus network is shown;
[0100] Figure 3 A flowchart showing the steps of a routing method for a dual-path Torus network provided in an embodiment of the present application is shown;
[0101] Figure 4 A schematic diagram of a dual-path Torus network provided in an embodiment of the present application is shown;
[0102] Figure 5 A schematic diagram of a dual-path link provided by an embodiment of the present application is shown;
[0103] Figure 6 A steering schematic diagram provided in an embodiment of the present application is shown;
[0104] Figure 7 A schematic diagram showing multiple target routing paths provided by an embodiment of the present application is shown;
[0105] Figure 8 A deadlock schematic diagram provided by an embodiment of the present application is shown;
[0106] Fig. 9 A schematic diagram of avoiding deadlock when routing along the X-axis provided by an embodiment of the present application is shown;
[0107] Fig.10 A schematic diagram of avoiding deadlock in the case of a redirection of an edge routing node provided by an embodiment of the present application is shown;
[0108] Fig.11 A functional module diagram of a routing device for a dual-path Torus network provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0109] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0110] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, each embodiment of the present application will be described in detail below in conjunction with the accompanying drawings. However, it will be appreciated by those skilled in the art that in each embodiment of the present application, many technical details are proposed in order to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present application can also be implemented. The division of the following embodiments is for the convenience of description, and the specific implementation of the present application should not constitute any limitation, and the various embodiments can be combined with each other and referenced to each other without contradiction.
[0111] Network-on-chip (NoC) is a new communication method for system-on-chip (SoC). The research on network-on-chip is still in its infancy, but following the development trend from single machine to network, it is very necessary to conduct relevant research on network-on-chip.
[0112] Reference Figure 1 , shows a schematic diagram of the topological structure of an existing two-dimensional on-chip network, which is a 4*4 two-dimensional Mesh network, including routing nodes and resource nodes. The routing node is a router used to arbitrate the direction of data flow. The routing node can determine the transmission path of the data packet in the network. The resource node can send and receive data. Full-duplex communication transmission mode is adopted between routing nodes and between routing nodes and resource nodes. Each routing node is connected to a resource node. The number of routing nodes in the network topology can be arbitrary, as long as each routing node is connected to a resource node.
[0113] However, as the number of routing nodes increases, the diameter and scale of the network also increase, which in turn has a significant impact on the network's latency and power consumption.
[0114] Routing algorithm is one of the focuses of NoC research. When the network topology is determined, the routing algorithm determines the data transmission path between the routing nodes of the network. For example, all nodes that need to be routed between the source node that sends the data packet and the target node that receives the data packet are determined according to the routing algorithm. That is, the routing algorithm is to select intermediate nodes so that the network delay of the data packet, the power consumption required in the delivery process, the data throughput rate and the reliability can all meet the set indicators; a good routing algorithm can optimize the performance of the chip, on the contrary, a bad routing algorithm will greatly reduce the performance of the chip.
[0115] Due to the existence of "closed loops" in Mesh networks, deadlock problems may occur. The existing XY routing algorithm is a classic routing algorithm that can avoid deadlock. For a two-dimensional mesh topology network on chip, each router has a coordinate (x, y) that uniquely corresponds to it. First, the data packet will compare the X-axis coordinate of the source node where it is located with the X-axis coordinate of the destination node. If the X-axis coordinate of the source node is smaller than the X-axis coordinate of the destination node, it will be routed eastward (i.e., routed along the positive direction of the X-axis). If the X-axis coordinate of the source node is larger than the X-axis coordinate of the destination node, it will be routed westward (i.e., routed along the negative direction of the X-axis). When the data packet is routed to the same X-axis coordinate as the destination node, it will be transmitted along the Y-axis. If the Y-axis coordinate of the data packet is smaller than the Y-axis coordinate of the destination node, the data packet will choose to route northward (i.e., routed along the positive direction of the Y-axis). If the Y-axis coordinate of the data packet is larger than the Y-axis coordinate of the destination node, the data packet will choose to be transmitted southward (i.e., routed along the negative direction of the Y-axis). This routing algorithm has low latency and can prevent possible problems such as deadlock, livelock, and starvation.
[0116] In a Mesh network, if a service request occurs between routing nodes located at the four corners of the Mesh network topology, it is necessary to cross half of the network to complete the routing service. In order to overcome this shortcoming, further shorten the network diameter and improve network performance, the Torus network has been proposed.
[0117] Reference Figure 2 , shows a schematic diagram of the structure of the existing Torus network. The Torus network is an improvement based on the Mesh network. The routing nodes on both sides of the network's square topology are connected using links in the horizontal and vertical directions, thereby shortening the network's diameter, reducing the network transmission delay and power consumption, and improving the network's performance.
[0118] However, the Torus network structure has more "closed loop" phenomena than the Mesh network, and is more prone to deadlock. Even if the existing XY routing algorithm is applied in the Torus network, deadlock will still occur. In order to solve the deadlock problem, an embodiment of the present application provides a routing method for a dual-path Torus network.
[0119] Reference Figure 3 , shows a flowchart of the steps of a routing method of a dual-path Torus network provided in an embodiment of the present application, the method is applied to a dual-path Torus network, in which there are dual-path links between routing nodes in the dual-path Torus network, the method comprising:
[0120] S101: In response to a current routing request, determine the coordinates of a source routing node and a target routing node where a target data packet is located.
[0121] Reference Figure 4 , shows a schematic diagram of the dual-path Torus network provided in this embodiment. In the topology of the dual-path Torus network, the routing nodes are connected based on dual-path links, and because it is a Torus network, the routing nodes on both sides of the network topology are also connected through dual-path links.
[0122] First, a coordinate system is constructed for the topological structure of the dual-path Torus network, and the coordinates corresponding to each routing node in the dual-path Torus network are determined. The horizontal and vertical coordinates corresponding to each routing node are greater than or equal to 0, that is, the routing node in the lower left corner of the dual-path Torus network topological structure is taken as the origin of the coordinate system.
[0123] like Figure 4 In the dual-path Torus network topology, the routing nodes located on the four edges are edge routing nodes, such as (0, 0), (1, 0), (2, 0), (3, 0), (4, 0), (0, 1), (0, 2), (0, 3), (0, 4), (1, 4), (2, 4), (3, 4), (4, 4), (4, 1), (4, 2) and (4, 3); the routing nodes located at the four corners in the dual-path Torus network topology are corner routing nodes, such as (0, 0), (4, 0), (0, 4) and (4, 4).
[0124] In the topology of a dual-path Torus network, a dual-path link between a routing node and another routing node refers to a transmission path or transmission channel including two full-duplex transmission paths.
[0125] Reference Figure 5, shows a schematic diagram of a dual-path link provided in an embodiment of the present application. In this embodiment, for any routing node in the topological structure of the dual-path Torus network, the dual-path links connected in four directions respectively include four transmission channels, two transmission channels in one direction are used to receive data packets, and two transmission channels are used to send data. In order to facilitate intuitive understanding, in this embodiment, for any routing node, channel identifiers are also set for different transmission channels. For example, the two channels transmitted along the positive direction of the X-axis are recorded as the first west-east transmission channel (the transmission channel in the west-east direction). 2) and the second west-east transmission channel (transmission channel 3 in the west-east direction), the two channels for transmission along the negative direction of the X-axis are recorded as the first east-west transmission channel (transmission channel 0 in the east-west direction) and the second east-west transmission channel (transmission channel 1 in the east-west direction), the two channels for transmission along the positive direction of the Y-axis are recorded as the first north-south transmission channel (transmission channel 2 in the north-south direction) and the second north-south transmission channel (transmission channel 3 in the north-south direction), and the two channels for transmission along the negative direction of the Y-axis are recorded as the first north-south transmission channel (transmission channel 0 in the north-south direction) and the second north-south transmission channel (transmission channel 1 in the north-south direction).
[0126] It is worth noting that the east, west, south and north mentioned in this embodiment are all referenced to the coordinate system of the topological structure of the dual-path Torus network. For example, in this coordinate system, the positive direction of the X-axis points to the east, the negative direction of the X-axis points to the east, the positive direction of the Y-axis points to the north, and the negative direction of the Y-axis points to the south.
[0127] S102: Determine a coordinate difference and a routing indication coordinate according to the coordinates of the source routing node and the coordinates of the target routing node.
[0128] Specifically, when determining the coordinate difference according to the coordinates of the source routing node and the coordinates of the target routing node, the difference between the abscissa of the target routing node and the abscissa of the source routing node is used as the abscissa difference; and the difference between the ordinate of the target routing node and the ordinate of the source routing node is used as the ordinate difference.
[0129] In a feasible implementation manner, the calculation formula of the coordinate difference may be:
[0130] (Δx,Δy)=(x D ,y D )-(x S ,y S )
[0131] =(x D -x S ,y D -y S )
[0132] Wherein, Δx is the horizontal coordinate difference, Δy is the vertical coordinate difference, (Δx, Δy) is the coordinate difference, (x D ,y D ) is the coordinate of the target routing node; (x S ,y S ) are the coordinates of the source routing node.
[0133] Specifically, when determining the routing indication coordinates according to the coordinates of the source routing node and the coordinates of the target routing node, it is necessary to determine the magnitude relationship between the horizontal coordinate and the vertical coordinate of the coordinate difference and N / 2, respectively, where N is the number of routing nodes in the horizontal direction or the vertical direction in the topological structure of the dual-path Torus network. For example, Figure 4 In the topology of the dual-path Torus network shown, N=5.
[0134] When the horizontal coordinate difference of the coordinate difference is less than N / 2, the horizontal coordinate of the route indication coordinate is the horizontal coordinate difference; when the horizontal coordinate difference of the coordinate difference is greater than or equal to N / 2, the horizontal coordinate of the route indication coordinate is obtained according to N and the horizontal coordinate difference.
[0135] When the ordinate difference of the coordinate difference is less than N / 2, the ordinate of the route indication coordinate is the ordinate difference; when the ordinate difference of the coordinate difference is greater than or equal to N / 2, the ordinate of the route indication coordinate is obtained according to N and the ordinate difference.
[0136] In a feasible implementation manner, the calculation formula of the route indication coordinates may be:
[0137]
[0138] Among them, Δx is the horizontal coordinate difference, Δy is the vertical coordinate difference, and N is the number of routing nodes in the horizontal direction or vertical direction in the topological structure of the dual-path Torus network; the Sign function is mainly used to return the sign of a number, if the variable is greater than 0, it returns 1; if the variable is equal to 0, it returns 0; if the variable is less than 0, it returns -1.
[0139] S103: Determine a target routing path corresponding to the target data packet according to the coordinate difference and the routing indication coordinates and a preset routing rule.
[0140] After determining the coordinate difference and the routing indication coordinates, the preset routing rules to be executed are determined according to the values of the coordinate difference and the routing indication coordinates. Specifically, the preset routing rules are used to determine the routing direction of the target data packet according to the routing indication coordinates, and to determine the transmission channel of the target data packet in the dual-path link according to the coordinate difference, so as to determine the shortest non-closed-loop routing path from the source routing node to the target routing node corresponding to the target data packet.
[0141] In one embodiment, when the absolute value of the abscissa of the route indication coordinate is 1 and the ordinate is 0, that is, |x l |=l,y l = 0, or when the abscissa of the route indication coordinate is 0 and the absolute value of the ordinate is 1, that is, x l =0,|y l When |=1, the first routing rule is executed to determine the target routing path corresponding to the target data packet, and the first routing rule is used to make the target routing path shortest.
[0142] When |x l |=1,y l =0 or x l =0,|y l When |=1, it indicates that the source routing node and the target routing node are directly connected, and the shortest route from the source routing node to the target routing node can be achieved by executing the first routing rule.
[0143] The first routing rule includes:
[0144] When the horizontal coordinate of the route indication coordinate is greater than 0, that is, x l >U, the first west-east transmission channel (west-east transmission channel 2) or the second west-east transmission channel (west-east transmission channel 3) along the positive direction of the X-axis is selected as the transmission channel of the target routing path;
[0145] When the horizontal coordinate of the route indication coordinate is less than 0, that is, x l When <0, the first east-west transmission channel (east-west transmission channel 0) or the second east-west transmission channel (east-west transmission channel 1) along the negative direction of the X-axis is selected as the transmission channel of the target routing path;
[0146] When the ordinate of the route indication coordinate is greater than 0, that is, y l >0, the first north-south transmission channel (north-south transmission channel 2) or the second north-south transmission channel along the positive direction of the Y axis is selected as the transmission channel of the target routing path (north-south transmission channel 3);
[0147] When the ordinate of the route indication coordinate is less than 0, that is, yl When <0, the first north-south transmission channel (transmission channel 0 in the north-south direction) or the second north-south transmission channel (transmission channel 1 in the north-south direction) along the negative direction of the Y axis is selected as the transmission channel of the target routing path.
[0148] In one embodiment, when both the horizontal coordinate and the vertical coordinate of the route indication coordinate are not 0, that is, x l ≠0,y l ≠0, indicating that the horizontal coordinates and vertical coordinates of the source routing node and the target routing node are different, and any one of the following A1-A3 is executed at this time.
[0149] A1: Prioritize X-axis routing and execute the second routing rule.
[0150] Specifically, executing the second routing rule includes:
[0151] A11: When the horizontal coordinate of the route indication coordinate is greater than 0 and the horizontal coordinate difference of the coordinate difference is greater than 0, that is, x l >0, Δx>0, the target data packet is sent through the first west-east transmission channel from the source routing node along the positive direction of the X-axis, that is, the west-east transmission channel 2 is selected for routing.
[0152] When routing along the X-axis direction, if the edge routing node of the dual-path Torus network is not crossed, the first east-west transmission channel for sending the target data packet is not changed, that is, the west-east transmission channel 2 is continuously used for routing.
[0153] When routing along the X-axis direction, if crossing the edge routing node of the dual-path Torus network, the first west-east transmission channel for sending the target data packet is changed to the second west-east transmission channel, that is, the routing of the west-east transmission channel 2 is changed to the routing from the west-east transmission channel 3.
[0154] A12: When the horizontal coordinate of the route indication coordinate is greater than 0 and the horizontal coordinate difference of the coordinate difference is less than 0, that is, x l >0, Δx<0, the target data packet is sent from the source routing node along the second west-east transmission channel in the positive direction of the X-axis, that is, regardless of whether it passes through an edge routing node, the west-east transmission channel 3 is continuously used for routing.
[0155] A13: When the horizontal coordinate of the route indication coordinate is less than 0 and the horizontal coordinate difference of the coordinate difference is less than 0, that is, x l <0, Δx<0, select the first east-west transmission channel from the source routing node along the negative direction of the X-axis to send the target data packet, that is, select the east-west transmission channel 0 for routing;
[0156] When routing along the X-axis direction, if the edge routing node of the dual-path Torus network is not crossed, the first east-west transmission channel for sending the target data packet is not changed, that is, the east-west transmission channel 0 is continuously used for routing;
[0157] When routing along the X-axis direction, if crossing the edge routing node of the dual-path Torus network, the first east-west transmission channel for sending the target data packet is changed to the second east-west transmission channel, that is, the routing of the east-west transmission channel 0 is changed to the routing from the east-west transmission channel 1.
[0158] A14: When the horizontal coordinate of the route indication coordinate is less than 0 and the horizontal coordinate difference of the coordinate difference is greater than 0, that is, x l <0, Δx>0, the target data packet is sent from the source routing node along the second east-west transmission channel in the negative direction of the X axis, that is, regardless of whether it passes through an edge routing node, the east-west transmission channel 1 is continuously used for routing.
[0159] A2: Prioritize Y-axis routing and execute the third routing rule.
[0160] Specifically, executing the third routing rule includes:
[0161] A21: When the ordinate of the route indication coordinate is greater than 0 and the ordinate difference of the coordinate difference is greater than 0, that is, y l >0, Δy>0, select the first north-south transmission channel along the positive direction of the Y axis from the source routing node to send the target data packet, that is, select the north-south transmission channel 2 for routing;
[0162] When routing along the Y-axis direction, if the edge routing node of the dual-path Torus network is not crossed, the first north-south transmission channel for sending the target data packet is not changed, that is, the north-south transmission channel 2 is continuously used for routing;
[0163] When routing along the Y-axis direction, if crossing the edge routing node of the dual-path Torus network, the first north-south transmission channel for sending the target data packet is changed to the second north-south transmission channel, that is, the routing of the north-south transmission channel 2 is changed to the routing from the north-south transmission channel 3.
[0164] A22: When the ordinate of the route indication coordinate is greater than 0 and the ordinate difference of the coordinate difference is less than 0, that is, y l >0, Δy<0, the target data packet is sent from the source routing node along the second north-south transmission channel in the positive direction of the Y axis, that is, regardless of whether it passes through an edge routing node, the north-south transmission channel 3 is continuously used for routing.
[0165] A23: When the ordinate of the route indication coordinate is less than 0 and the ordinate difference of the coordinate difference is less than 0, that is, y l <0, Δy<0, select the first north-south transmission channel along the negative direction of the Y axis from the source routing node to send the target data packet, that is, select the transmission channel 0 in the north-south direction for routing;
[0166] When routing along the Y-axis direction, if the edge routing node of the dual-path Torus network is not crossed, the first north-south transmission channel for sending the target data packet is not changed, that is, the north-south transmission channel 0 is continuously used for routing;
[0167] When routing along the Y-axis direction, if crossing the edge routing node of the dual-path Torus network, the first north-south transmission channel for sending the target data packet is changed to the second north-south transmission channel, that is, the routing of the north-south transmission channel 0 is changed to the routing from the north-south transmission channel 1.
[0168] A24: When the ordinate of the route indication coordinate is less than 0 and the ordinate difference of the coordinate difference is greater than 0, that is, y l <0, Δy>0, the target data packet is sent from the source routing node along the second north-south transmission channel in the negative direction of the Y axis, that is, regardless of whether it passes through an edge routing node, the north-south transmission channel 1 is continuously used for routing.
[0169] In addition, when x l ≠0,y l = 0, it indicates that the source routing node and the target routing node have the same ordinate, so it only needs to be routed along the X-axis direction, and the second routing rule is executed at this time; when x l =0,y l When ≠0, it indicates that the source routing node and the target routing node have the same horizontal coordinate, so it only needs to be routed along the Y-axis direction, and the third routing rule is executed at this time.
[0170] A3: Select the redirect route and execute the fourth routing rule.
[0171] Reference Figure 6 , shows a schematic diagram of the redirection provided by this embodiment. Specifically, executing the fourth routing rule includes:
[0172] A31: If at the routing node, the transmission direction of the target data packet changes from along the positive direction of the X-axis to along the positive direction of the Y-axis, it is called a northwest turn, and the channel identification number of the transmission channel remains unchanged, that is, the target data packet transmitted based on the first west-east transmission channel (transmission channel 2 in the west-east direction) selects the first north-south transmission channel (transmission channel 2 in the north-south direction) for transmission, and the target data packet transmitted based on the second west-east transmission channel (transmission channel 3 in the west-east direction) selects the second north-south transmission channel (transmission channel 3 in the north-south direction) for transmission;
[0173] A32: If at the routing node, the transmission direction of the target data packet changes from the negative direction of the X-axis to the negative direction of the Y-axis, it is called a southeast turn, and the channel identification number of the transmission channel remains unchanged, that is, the target data packet transmitted based on the first east-west transmission channel (transmission channel 0 in the east-west direction) selects the first north-south transmission channel (transmission channel 0 in the north-south direction) for transmission, and the target data packet transmitted based on the second east-west transmission channel (transmission channel 1 in the east-west direction) selects the second north-south transmission channel (transmission channel 1 in the north-south direction) for transmission;
[0174] A33: If at the routing node, the transmission direction of the target data packet is changed from the positive direction of the Y axis to the positive direction of the X axis, it is called a south-east turn, and the channel identification number of the transmission channel remains unchanged, that is, the target data packet transmitted based on the first north-south transmission channel (transmission channel 2 in the north-south direction) selects the first west-east transmission channel (transmission channel 2 in the west-east direction) for transmission, and the target data packet transmitted based on the second north-south transmission channel (transmission channel 3 in the north-south direction) selects the second west-east transmission channel (transmission channel 3 in the west-east direction) for transmission;
[0175] A34: If at the routing node, the transmission direction of the target data packet changes from the negative direction of the Y axis to the negative direction of the X axis, it is called a north-west turn, and the channel identification number of the transmission channel remains unchanged, that is, the target data packet transmitted based on the first north-south transmission channel (transmission channel 0 in the north-south direction) selects the first east-west transmission channel (transmission channel 0 in the east-west direction) for transmission, and the target data packet transmitted based on the second north-south transmission channel (transmission channel 1 in the north-south direction) selects the second east-west transmission channel (transmission channel 1 in the east-west direction) for transmission;
[0176] A35: If at the routing node, the transmission direction of the target data packet is changed from the positive direction of the X-axis to the negative direction of the Y-axis, it is called a southwest turn, and the channel identifier of the transmission channel changes, the channel identifier number of 2 is changed to 1, and the channel identifier number of 3 is changed to 0, that is, the target data packet transmitted based on the first west-east transmission channel (transmission channel 2 in the west-east direction) selects the second north-south transmission channel (transmission channel 1 in the north-south direction) for transmission, and the target data packet transmitted based on the second west-east transmission channel (transmission channel 3 in the west-east direction) selects the first north-south transmission channel (transmission channel 0 in the north-south direction) for transmission;
[0177] A36: If at the routing node, the transmission direction of the target data packet changes from the negative direction of the X-axis to the positive direction of the Y-axis, it is called a northeast turn, and the channel identifier of the transmission channel changes from 0 to 2, and from 1 to 3, that is, the target data packet transmitted based on the first east-west transmission channel (transmission channel 0 in the east-west direction) selects the first north-south transmission channel (transmission channel 2 in the north-south direction) for transmission, and the target data packet transmitted based on the second east-west transmission channel (transmission channel 1 in the east-west direction) selects the second north-south transmission channel (transmission channel 3 in the north-south direction) for transmission;
[0178] A37: If at the routing node, the transmission direction of the target data packet changes from the positive direction of the Y axis to the negative direction of the X axis, it is called a south-west turn, and the channel identifier of the transmission channel changes, the channel identifier number of 2 is changed to 1, and the channel identifier number of 3 is changed to 0, that is, the target data packet transmitted based on the first north-south transmission channel (transmission channel 2 in the north-south direction) selects the second east-west transmission channel (transmission channel 1 in the east-west direction) for transmission, and the target data packet transmitted based on the second north-south transmission channel (transmission channel 3 in the north-south direction) selects the first east-west transmission channel (transmission channel 0 in the east-west direction) for transmission;
[0179] A38: If at the routing node, the transmission direction of the target data packet is changed from the negative direction of the Y axis to the positive direction of the X axis, it is called a north-east turn, and the channel identifier of the transmission channel changes, the channel identifier number of 0 is changed to 2, and the channel identifier number of 1 is changed to 3, that is, the target data packet transmitted based on the first north-south transmission channel (transmission channel 0 in the north-south direction) selects the first west-east transmission channel (transmission channel 2 in the west-east direction) for transmission, and the target data packet transmitted based on the second north-south transmission channel (transmission channel 1 in the north-south direction) selects the second west-east transmission channel (transmission channel 3 in the west-east direction) for transmission.
[0180] To summarize the above A31-A38, that is, for northwest turns, southeast turns, northwest turns and southeast turns, the channel identification number of the transmission channel after the turn is consistent with the channel identification number of the transmission channel before the turn; for southwest turns and southwest turns, if the channel identification number of the transmission channel before the turn is 2, the channel identification number of the transmission channel after the turn is 1; if the channel identification number of the transmission channel before the turn is 3, the channel identification number of the transmission channel after the turn is 0; for northeast turns and northeast turns, if the channel identification number of the transmission channel before the turn is 1, the channel identification number of the transmission channel after the turn is 3; if the channel identification number of the transmission channel before the turn is 0, the channel identification number of the transmission channel after the turn is 2.
[0181] The multiple routing rules included in the routing method provided by the method can not only solve the deadlock problem in the dual-path Torus network, but also provide multiple target routing paths for a target data packet, with path diversity.
[0182] In the actual implementation process, the target routing path corresponding to the target data packet can be determined first and then the target data packet can be sent. When multiple target routing paths are determined, the target routing path with the smallest current occupancy of the routing node is selected as the final routing path corresponding to the target data packet; the target data packet is sent along the final routing path.
[0183] Specifically, the target data packet is sent from the source routing node to the next routing node according to the target routing path; the next routing node is used as the updated source routing node; based on the coordinates of the updated source routing node and the coordinates of the target routing node.
[0184] If there are multiple next routing nodes determined, the routing node with the smallest current occupancy can also be selected as the next routing node to send the target data packet, and then the target routing path of the target data packet can be determined in real time according to the current occupancy of the routing node.
[0185] In a feasible implementation, it is assumed that the coordinates of the source routing node of the target data packet are (3, 3) and the target routing node is (0, 1).
[0186] First calculate the coordinate difference (Δx, Δy):
[0187] (Δx, Δy) = (x D ,y D )-(x S ,y S )
[0188] =(0-3, 1-3)
[0189] =(-3,-2)
[0190] Then, according to the calculation formula of the route indication coordinates in the above S102, the route indication coordinates are calculated as ( xl ,y l )=(2,).
[0191] Reference Figure 7 , which shows a schematic diagram of multiple target routing paths provided by this embodiment. Since the routing indication coordinates (x l ,y l )=(2,2), the horizontal coordinate and the vertical coordinate are not 0, so the X-axis direction routing can be preferentially selected and the second routing rule can be executed, or the Y-axis direction routing can be preferentially selected and the third routing rule can be executed, and the steering routing can also be selected and the fourth routing rule can be executed.
[0192] like Figure 7 As shown in (2), if the X-axis direction routing is selected and the second routing rule is executed, since x l >0, Δx<0, the target data packet is sent along the second east-west transmission channel (west-east transmission channel 3) in the positive direction of the X-axis. Even when routing from coordinates (4, 3) to coordinates (0, 3) through the edge routing node, the west-east transmission channel 3 is still used for routing to coordinates (0.3).
[0193] Reference Figure 8 , shows a deadlock schematic diagram provided by this embodiment, such as Figure 8 The ring network topology shown in (1) is prone to deadlock. Assume that there are four routing requests at the same time:
[0194] 1. Routing node 2 to routing node 7;
[0195] 2. Routing node 3 to routing node 6;
[0196] 3. Routing node 7 to routing node 2;
[0197] 4. Routing node 6 to routing node 3;
[0198] like Figure 8 As shown in (2), when these four routing requests need to pass through a routing node and all choose clockwise routing, and all have occupied the middle routing node, a deadlock problem will occur.
[0199] like Figure 8 As shown in (3), when these four routing requests need to pass through a routing node and all choose counterclockwise routing, and all have occupied the middle routing node, a deadlock will also occur. Figure 8 (2) and Figure 8The solid line in (3) represents the currently occupied transmission channel, and the dotted line represents the transmission channel being requested.
[0200] Once deadlock occurs, it will cause the entire Internet network to be paralyzed. However, the routing method proposed in this embodiment can avoid deadlock.
[0201] Take the routing request that is routed only in the X-axis direction as an example, that is, y l =0, Δy=0, the routing path is only along the X-axis, according to the second routing rule.
[0202] Reference Fig. 9 , showing a schematic diagram of avoiding deadlock when routing along the X-axis provided by the present embodiment. Specifically, in the routing path along the X-axis, if it is counterclockwise, that is, when transmitting along the positive direction of the X-axis, according to A11-A12 of the second routing rule, there are only transmission channel conversions from transmission channel 2 to transmission channel 2, from transmission channel 2 to transmission channel 3, and from transmission channel 3 to transmission channel 3, and it is impossible to form a closed-loop deadlock.
[0203] like Fig. 9 As shown in (1), at x l >0, Δx>0, select transmission channel 2 in the west-east direction. For example, when request 1 is routed from coordinates (0, 4) to (1, 4), transmission channel 2 in the west-east direction is occupied, and transmission channel 2 in the west-east direction from coordinates (1, 4) to (2, 4) is requested; when request 2 is routed from coordinates (1, 4) to (2, 4), transmission channel 2 in the west-east direction is also occupied and transmission channel 2 in the west-east direction is requested; when request 3 is routed from coordinates (3, 4) to (4, 4), transmission channel 2 in the west-east direction is occupied and transmission channel 3 in the west-east direction from coordinates (4, 4) to (0, 4), that is, the transmission channel is changed.
[0204] In x l >0, Δx<0, regardless of whether it passes through the edge routing node, the transmission channel 3 in the west-east direction is continuously used for routing. For example, when request 4 is routed from coordinates (3, 4) to (4, 4), the transmission channel 3 in the west-east direction is occupied. At this time, there is no need to switch the transmission channel, so the transmission channel 3 in the west-east direction from coordinates (4, 4) to (0, 4) is continuously requested.
[0205] For example, in the routing path along the positive direction of the X-axis, a data packet routed using transmission channel 2 is switched to transmission channel 3 when passing through an edge routing node, thereby avoiding a closed-loop deadlock on transmission channel 2. When routing using transmission channel 3, although the transmission channel is not changed at the edge routing node, according to A12, transmission channel 3 is only used for routing when Δx is less than 0, indicating that the target routing node is on the left side of the source routing node, and the data packet can reach the target routing node before a closed loop is formed, and a closed-loop deadlock will not occur.
[0206] Specifically, in the routing path along the X-axis, if it is in the clockwise direction, that is, when transmitting along the negative direction of the X-axis, according to A13-A14 of the second routing rule, there is only a conversion of the transmission channel from transmission channel 0 to transmission channel 0 to transmission channel 1 and from transmission channel 1 to transmission channel 1, and it is impossible to form a closed-loop deadlock.
[0207] like Fig. 9 As shown in (2), at x l <0, Δx<0, select the east-west transmission channel 0. For example, when request 6 is routed from coordinates (4, 4) to (3, 4), the east-west transmission channel 0 is occupied, and the east-west transmission channel 0 from coordinates (3, 4) to (2, 4) is requested. For request 8, when routing from coordinates (1, 4) to (0, 4), the east-west transmission channel 0 is occupied, and the east-west transmission channel 1 from coordinates (0, 4) to (4, 4) is requested, that is, the transmission channel is switched.
[0208] In x l When <0, Δx>0, regardless of whether it passes through the edge routing node, the east-west transmission channel 1 is continuously used for routing. For example, when request 9 is routed from coordinates (1, 4) to (0, 4), the east-west transmission channel 1 is occupied. At this time, there is no need to switch the transmission channel, so the east-west transmission channel 1 from coordinates (0, 4) to (4, 4) is continuously requested.
[0209] The reason for avoiding deadlock in routing requests that are routed only in the Y-axis direction is the same as the reason for avoiding deadlock in routing requests that are routed only in the X-axis direction.
[0210] Take the routing request that is routed in both the X-axis direction and the Y-axis direction as an example, that is, l ≠0,y l ≠0, this definitely involves a turn from the X-axis to the Y-axis or from the Y-axis to the X-axis, but for routing requests that do not cross edge routing nodes, as long as the fourth routing rule is executed, no deadlock will occur; and for requests that need to cross edge routing nodes, if the fourth routing rule is executed, no deadlock will occur.
[0211] Reference Fig.10 , showing a schematic diagram of avoiding deadlock in the case of a turn of edge routing nodes provided in this embodiment. For routing request 1, the route from coordinates (0, 4) to (4, 4) to (4, 0) has a northeast turn recorded in A36 of the fourth routing rule. Therefore, when routing from coordinates (0, 4) to (4, 4), the transmission channel 1 in the east-west direction is occupied, and then the transmission channel 3 in the north-south direction between (4, 4) and (4, 0) is requested.
[0212] For route request 2, the route from coordinates (4, 4) to (4, 0) to (0, 0) has a south-east turn recorded in A33 of the fourth routing rule. Therefore, when routing from coordinates (4, 4) to (4, 0), transmission channel 3 in the north-south direction is occupied, and then transmission channel 3 in the west-east direction between (4, 0) and (0, 0) is requested.
[0213] For route request 3, the route from coordinates (4, 0) to (0, 0) to (0, 4) has a southwest turn recorded in A35 of the fourth routing rule. Therefore, when routing from coordinates (4, 0) to (0, 0), transmission channel 3 in the west-east direction is occupied, and then transmission channel 0 in the north-south direction between (0, 0) and (0, 4) is requested.
[0214] For route request 4, the route from coordinates (0, 0) to (0, 4) to (4, 4) has a northwest turn recorded in A34 of the fourth routing rule. Therefore, when routing from coordinates (0, 0) to (0, 4), transmission channel 1 in the north-south direction is occupied, and then transmission channel 1 in the east-west direction between (0, 4) and (4, 4) is requested.
[0215] For route request 5, the route from coordinates (4, 4) to (0, 4) to (0, 0) has a northwest turn recorded in A31 of the fourth routing rule. Therefore, when routing from coordinates (4, 4) to (0, 4), transmission channel 3 in the west-east direction is occupied, and then transmission channel 3 in the north-south direction between (0, 4) and (0, 0) is requested.
[0216] For route request 6, the route from coordinates (0, 4) to (0, 0) to (4, 0) has a south-west turn recorded in A37 of the fourth routing rule. Therefore, when routing from coordinates (0, 4) to (0, 0), the transmission channel 3 in the north-south direction is occupied, and then the transmission channel 0 in the east-west direction between (0, 0) and (4, 0) is requested.
[0217] For route request 7, the route from coordinates (0, 0) to (4, 0) to (4, 4) has a southeast turn recorded in A32 of the fourth routing rule. Therefore, when routing from coordinates (0, 0) to (4, 0), transmission channel 1 in the east-west direction is occupied, and then transmission channel 1 in the north-south direction between (4, 0) and (4, 4) is requested.
[0218] For route request 8, the route from coordinates (4, 0) to (4, 4) to (0, 4) has a north-east turn recorded in A38 of the fourth routing rule. Therefore, when routing from coordinates (4, 0) to (4, 4), transmission channel 1 in the north-south direction is occupied, and then transmission channel 3 in the west-east direction between (4, 4) and (0, 4) is requested.
[0219] Therefore, in this method, no matter the routing is only along the X-axis or the Y-axis, or the turning from the X-axis to the Y-axis or from the Y-axis to the X-axis, there will be no deadlock problem. Therefore, the routing method of this embodiment can avoid deadlock, and this method can also have the effect of generating diversity of target routing paths, so that multiple routing paths can be provided for selection, and the routing rules of this routing method are simple, which is easy to be applied to hardware implementation.
[0220] Reference Fig.11 , shows a functional module diagram of a routing device of a dual-path Torus network provided in an embodiment of the present application, the device is applied to a dual-path Torus network, and there are dual-path links between routing nodes in the dual-path Torus network, the device includes:
[0221] A coordinate determination module 100, for determining the coordinates of the source routing node and the coordinates of the target routing node where the target data packet is located in response to the current routing request;
[0222] The calculation module 200 is used to determine the coordinate difference and the routing indication coordinate according to the coordinates of the source routing node and the coordinates of the target routing node;
[0223] The target routing path determination module 300 is used to determine the target routing path corresponding to the target data packet according to the coordinate difference and the routing indication coordinates and the preset routing rules;
[0224] Among them, the preset routing rules are used to determine the routing direction of the target data packet according to the routing indication coordinates, and to determine the transmission channel of the target data packet in the dual-path link according to the coordinate difference, so as to determine the shortest non-closed-loop routing path from the source routing node to the target routing node corresponding to the target data packet.
[0225] Optionally, the target routing path determination module includes:
[0226] a first target routing path determination submodule, configured to execute a first routing rule to determine a target routing path corresponding to the target data packet when the absolute value of the abscissa of the routing indication coordinate is 1 and the ordinate is 0, or when the abscissa of the routing indication coordinate is 0 and the absolute value of the ordinate is 1, wherein the first routing rule is configured to make the target routing path the shortest;
[0227] The first routing rule includes:
[0228] When the horizontal coordinate of the routing indication coordinate is greater than 0, the first west-east transmission channel or the second west-east transmission channel along the positive direction of the X-axis is selected as the transmission channel of the target routing path;
[0229] When the horizontal coordinate of the routing indication coordinate is less than 0, the first east-west transmission channel or the second east-west transmission channel along the negative direction of the X-axis is selected as the transmission channel of the target routing path;
[0230] When the ordinate of the routing indication coordinate is greater than 0, the first north-south transmission channel or the second north-south transmission channel along the positive direction of the Y axis is selected as the transmission channel of the target routing path;
[0231] When the ordinate of the routing indication coordinate is less than 0, the first north-south transmission channel or the second north-south transmission channel along the negative direction of the Y axis is selected as the transmission channel of the target routing path.
[0232] Optionally, the target routing path determination module includes:
[0233] A second target routing path determination submodule is used to preferentially select the X-axis direction routing and execute the second routing rule;
[0234] A third target routing path determination submodule, used for preferentially selecting a Y-axis direction routing and executing a third routing rule;
[0235] The fourth target routing path determination submodule is used to select a redirection route and execute a fourth routing rule.
[0236] Optionally, the second target routing path determination submodule is used to execute a second routing rule when the abscissa of the routing indication coordinate is not equal to 0 and the ordinate is equal to 0.
[0237] Optionally, the third target routing path determination submodule is used to execute a third routing rule when the abscissa of the routing indication coordinate is equal to 0 and the ordinate is not equal to 0.
[0238] Optionally, the second target routing path determination submodule is used to:
[0239] When the abscissa of the routing indication coordinate is greater than 0 and the abscissa difference of the coordinate difference is greater than 0, selecting a first west-east transmission channel from the source routing node along the positive direction of the X-axis to send the target data packet;
[0240] When routing along the X-axis direction, if the edge routing node of the dual-path Torus network is not crossed, the first west-east transmission channel for sending the target data packet is not changed;
[0241] When routing along the X-axis direction, if crossing the edge routing node of the dual-path Torus network, the first west-east transmission channel for sending the target data packet is changed to the second west-east transmission channel.
[0242] Optionally, executing the second routing rule includes:
[0243] When the abscissa of the routing indication coordinate is greater than 0 and the abscissa difference of the coordinate difference is less than 0, the target data packet is sent from the source routing node along the second east-west transmission channel in the positive direction of the X-axis.
[0244] Optionally, the second target routing path determination submodule is used to:
[0245] When the abscissa of the routing indication coordinate is less than 0 and the abscissa difference of the coordinate difference is less than 0, selecting a first east-west transmission channel from the source routing node along the negative direction of the X-axis to send the target data packet;
[0246] When routing along the X-axis direction, if the edge routing node of the dual-path Torus network is not crossed, the first east-west transmission channel for sending the target data packet is not changed;
[0247] When routing along the X-axis direction, if crossing the edge routing node of the dual-path Torus network, the first east-west transmission channel for sending the target data packet is changed to the second east-west transmission channel.
[0248] Optionally, the second target routing path determination submodule is used to:
[0249] When the abscissa of the routing indication coordinate is less than 0 and the abscissa difference of the coordinate difference is greater than 0, the target data packet is sent through a second east-west transmission channel from the source routing node along the negative direction of the X-axis.
[0250] Optionally, the third target routing path determination submodule is used to:
[0251] When the ordinate of the routing indication coordinate is greater than 0 and the ordinate difference of the coordinate difference is greater than 0, selecting a first north-south transmission channel along the positive direction of the Y axis from the source routing node to send the target data packet;
[0252] When routing along the Y-axis direction, if the edge routing node of the dual-path Torus network is not crossed, the first north-south transmission channel for sending the target data packet is not changed;
[0253] When routing along the Y-axis direction, if crossing the edge routing node of the dual-path Torus network, the first north-south transmission channel for sending the target data packet is changed to the second north-south transmission channel.
[0254] Optionally, the third target routing path determination submodule is used to:
[0255] When the ordinate of the routing indication coordinate is greater than 0 and the ordinate difference of the coordinate difference is less than 0, the target data packet is sent through a second north-south transmission channel from the source routing node along the positive direction of the Y axis.
[0256] Optionally, the third target routing path determination submodule is used to:
[0257] When the ordinate of the routing indication coordinate is less than 0 and the ordinate difference of the coordinate difference is less than 0, selecting a first north-south transmission channel along the negative direction of the Y axis from the source routing node to send the target data packet;
[0258] When routing along the Y-axis direction, if the edge routing node of the dual-path Torus network is not crossed, the first north-south transmission channel for sending the target data packet is not changed;
[0259] When routing along the Y-axis direction, if crossing the edge routing node of the dual-path Torus network, the first north-south transmission channel for sending the target data packet is changed to the second north-south transmission channel.
[0260] Optionally, the third target routing path determination submodule is used to:
[0261] When the ordinate of the routing indication coordinate is less than 0 and the ordinate difference of the coordinate difference is greater than 0, the target data packet is sent through a second north-south transmission channel from the source routing node along the negative direction of the Y axis.
[0262] Optionally, the fourth target routing path determination submodule is used to:
[0263] If at the routing node, the transmission direction of the target data packet changes from the positive direction of the X-axis to the positive direction of the Y-axis, the target data packet transmitted based on the first west-east transmission channel selects the first north-south transmission channel for transmission, and the target data packet transmitted based on the second west-east transmission channel selects the second north-south transmission channel for transmission;
[0264] If at the routing node, the transmission direction of the target data packet changes from the negative direction of the X-axis to the negative direction of the Y-axis, the target data packet transmitted based on the first east-west transmission channel selects the first north-south transmission channel for transmission, and the target data packet transmitted based on the second east-west transmission channel selects the second north-south transmission channel for transmission;
[0265] If at the routing node, the transmission direction of the target data packet changes from the positive direction of the Y axis to the positive direction of the X axis, the target data packet transmitted based on the first north-south transmission channel selects the first west-east transmission channel for transmission, and the target data packet transmitted based on the second north-south transmission channel selects the second west-east transmission channel for transmission;
[0266] If at the routing node, the transmission direction of the target data packet changes from the negative direction of the Y axis to the negative direction of the X axis, the target data packet transmitted based on the first north-south transmission channel selects the first east-west transmission channel for transmission, and the target data packet transmitted based on the second north-south transmission channel selects the second east-west transmission channel for transmission;
[0267] If at the routing node, the transmission direction of the target data packet changes from the positive direction along the X-axis to the negative direction along the Y-axis, the target data packet transmitted based on the first west-east transmission channel selects the second north-south transmission channel for transmission, and the target data packet transmitted based on the second west-east transmission channel selects the first north-south transmission channel for transmission;
[0268] If at the routing node, the transmission direction of the target data packet changes from the negative direction of the X-axis to the positive direction of the Y-axis, the target data packet transmitted based on the first east-west transmission channel selects the first north-south transmission channel for transmission, and the target data packet transmitted based on the second east-west transmission channel selects the second north-south transmission channel for transmission;
[0269] If at the routing node, the transmission direction of the target data packet changes from the positive direction along the Y axis to the negative direction along the X axis, the target data packet transmitted based on the first north-south transmission channel selects the second east-west transmission channel for transmission, and the target data packet transmitted based on the second north-south transmission channel selects the first east-west transmission channel for transmission;
[0270] If at the routing node, the transmission direction of the target data packet changes from the negative direction of the Y-axis to the positive direction of the X-axis, the target data packet transmitted based on the first north-south transmission channel selects the first west-east transmission channel for transmission, and the target data packet transmitted based on the second north-south transmission channel selects the second west-east transmission channel for transmission.
[0271] Optionally, the device further comprises:
[0272] A first selection module is used to select, when determining multiple target routing paths, a target routing path with the smallest current occupancy of routing nodes as a final routing path corresponding to the target data packet;
[0273] The target data packet is sent along the final routing path.
[0274] Optionally, the device further comprises:
[0275] The second selection module is used to send the target data packet from the source routing node to the next routing node according to the target routing path, wherein, when there are multiple next routing nodes, the routing node with the smallest current occupancy is used as the next routing node to send the target data packet; the next routing node is used as the updated source routing node; and the routing path of the target data packet is determined in real time according to the coordinates of the updated source routing node and the coordinates of the target routing node.
[0276] Optionally, the device further comprises:
[0277] A coordinate system construction module, used to construct a coordinate system for the topological structure of the dual-path Torus network, determine the coordinates corresponding to each routing node in the dual-path Torus network, and the horizontal coordinate and the vertical coordinate corresponding to each routing node are greater than or equal to 0;
[0278] The marking module is used for, for any routing node, recording the two channels transmitted along the positive direction of the X-axis as the first west-east transmission channel and the second west-east transmission channel, recording the two channels transmitted along the negative direction of the X-axis as the first east-west transmission channel and the second east-west transmission channel, recording the two channels transmitted along the positive direction of the Y-axis as the first north-south transmission channel and the second north-south transmission channel, and recording the two channels transmitted along the negative direction of the Y-axis as the first north-south transmission channel and the second north-south transmission channel.
[0279] Optionally, the coordinate determination module includes:
[0280] The coordinate difference determination submodule is used to use the difference between the abscissa of the target routing node and the abscissa of the source routing node as the abscissa difference; and use the difference between the ordinate of the target routing node and the ordinate of the source routing node as the ordinate difference.
[0281] Optionally, the coordinate determination module includes:
[0282] The route indication coordinate determination submodule is used to determine that when the horizontal coordinate difference of the coordinate difference is less than N / 2, the horizontal coordinate of the route indication coordinate is the horizontal coordinate difference; when the horizontal coordinate difference of the coordinate difference is greater than or equal to N / 2, the horizontal coordinate of the route indication coordinate is obtained according to N and the horizontal coordinate difference; when the vertical coordinate difference of the coordinate difference is less than N / 2, the vertical coordinate of the route indication coordinate is the vertical coordinate difference; when the vertical coordinate difference of the coordinate difference is greater than or equal to N / 2, the vertical coordinate of the route indication coordinate is obtained according to N and the vertical coordinate difference.
[0283] The embodiment of the present application also provides a server switching chip, namely a server Switch chip, on which a dual-path Torus network is arranged, and the chip is used to execute the routing method of the dual-path Torus network described in the embodiment.
[0284] The present application also provides a computing device, including:
[0285] A memory storing a computer-readable code; and one or more processors. When the computer-readable code is executed by the one or more processors, the computing and processing device executes the routing method of the dual-path Torus network described in the embodiment.
[0286] An embodiment of the present application further provides a non-volatile readable storage medium, wherein the non-volatile readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the routing method of the dual-path Torus network described in the embodiment is performed.
[0287] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0288] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, devices or computer program products. Therefore, the present application can be implemented in the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present application can be implemented in the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0289] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems) and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram and the combination of the processes and / or blocks in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0290] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0291] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0292] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.
[0293] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0294] Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A routing method for a dual-path Torus network, It is characterized in that Applied to a dual-path Torus network, wherein there are dual-path links between routing nodes in the dual-path Torus network, the method comprises: In response to the current routing request, determining the coordinates of the source routing node and the coordinates of the target routing node where the target data packet is located; Determine a coordinate difference and a routing indication coordinate according to the coordinates of the source routing node and the coordinates of the target routing node; Determine the target routing path corresponding to the target data packet according to the coordinate difference and the routing indication coordinates and the preset routing rules; Among them, the preset routing rules are used to determine the routing direction of the target data packet according to the routing indication coordinates, and to determine the transmission channel of the target data packet in the dual-path link according to the coordinate difference, so as to determine the shortest non-closed-loop routing path from the source routing node to the target routing node corresponding to the target data packet.
2. The method according to claim 1, It is characterized in that Determining a target routing path corresponding to the target data packet according to the coordinate difference and the routing indication coordinates and a preset routing rule, including: When the absolute value of the abscissa of the routing indication coordinate is 1 and the ordinate is 0, or when the abscissa of the routing indication coordinate is 0 and the absolute value of the ordinate is 1, executing a first routing rule to determine a target routing path corresponding to the target data packet, wherein the first routing rule is used to make the target routing path shortest; The first routing rule includes: When the horizontal coordinate of the routing indication coordinate is greater than 0, the first west-east transmission channel or the second west-east transmission channel along the positive direction of the X-axis is selected as the transmission channel of the target routing path; When the horizontal coordinate of the routing indication coordinate is less than 0, the first east-west transmission channel or the second east-west transmission channel along the negative direction of the X-axis is selected as the transmission channel of the target routing path; When the ordinate of the routing indication coordinate is greater than 0, the first north-south transmission channel or the second north-south transmission channel along the positive direction of the Y axis is selected as the transmission channel of the target routing path; When the ordinate of the routing indication coordinate is less than 0, the first north-south transmission channel or the second north-south transmission channel along the negative direction of the Y axis is selected as the transmission channel of the target routing path.
3. The method according to claim 1, It is characterized in that Determining a target routing path corresponding to the target data packet according to the coordinate difference and the routing indication coordinates and a preset routing rule, including: When both the horizontal coordinate and the vertical coordinate of the route indication coordinate are not 0, any of the following is performed: Prioritize the X-axis direction routing and execute the second routing rule; Prioritize the Y-axis direction routing and execute the third routing rule; Select the redirect route and execute the fourth routing rule.
4. The method according to claim 1, It is characterized in that Determining a target routing path corresponding to the target data packet according to the coordinate difference and the routing indication coordinates and a preset routing rule, including: When the abscissa of the routing indication coordinate is not equal to 0 and the ordinate is equal to 0, the second routing rule is executed.
5. The method according to claim 1, It is characterized in that Determining a target routing path corresponding to the target data packet according to the coordinate difference and the routing indication coordinates and a preset routing rule, including: When the abscissa of the routing indication coordinate is equal to 0 and the ordinate is not equal to 0, the third routing rule is executed.
6. The method according to claim 3 or 4, It is characterized in that Execute the second routing rule, including: When the abscissa of the routing indication coordinate is greater than 0 and the abscissa difference of the coordinate difference is greater than 0, selecting a first west-east transmission channel from the source routing node along the positive direction of the X-axis to send the target data packet; When routing along the X-axis direction, if the edge routing node of the dual-path Torus network is not crossed, the first east-west transmission channel for sending the target data packet is not changed; When routing along the X-axis direction, if crossing the edge routing node of the dual-path Torus network, the first west-east transmission channel for sending the target data packet is changed to the second west-east transmission channel.
7. The method according to claim 3 or 4, It is characterized in that Execute the second routing rule, including: When the abscissa of the routing indication coordinate is greater than 0 and the abscissa difference of the coordinate difference is less than 0, the target data packet is sent from the source routing node along the second east-west transmission channel in the positive direction of the X-axis.
8. The method according to claim 3 or 4, It is characterized in that Execute the second routing rule, including: When the abscissa of the routing indication coordinate is less than 0 and the abscissa difference of the coordinate difference is less than 0, selecting a first east-west transmission channel from the source routing node along the negative direction of the X-axis to send the target data packet; When routing along the X-axis direction, if the edge routing node of the dual-path Torus network is not crossed, the first east-west transmission channel for sending the target data packet is not changed; When routing along the X-axis direction, if crossing the edge routing node of the dual-path Torus network, the first east-west transmission channel for sending the target data packet is changed to the second east-west transmission channel.
9. The method according to claim 3 or 4, It is characterized in that Execute the second routing rule, including: When the abscissa of the routing indication coordinate is less than 0 and the abscissa difference of the coordinate difference is greater than 0, the target data packet is sent through a second east-west transmission channel from the source routing node along the negative direction of the X-axis.
10. The method according to claim 3 or 5, It is characterized in that Execute the third routing rule, including: When the ordinate of the routing indication coordinate is greater than 0 and the ordinate difference of the coordinate difference is greater than 0, selecting a first north-south transmission channel along the positive direction of the Y axis from the source routing node to send the target data packet; When routing along the Y-axis direction, if the edge routing node of the dual-path Torus network is not crossed, the first north-south transmission channel for sending the target data packet is not changed; When routing along the Y-axis direction, if crossing the edge routing node of the dual-path Torus network, the first north-south transmission channel for sending the target data packet is changed to the second north-south transmission channel.
11. The method according to claim 3 or 5, It is characterized in that Execute the third routing rule, including: When the ordinate of the routing indication coordinate is greater than 0 and the ordinate difference of the coordinate difference is less than 0, the target data packet is sent through a second north-south transmission channel from the source routing node along the positive direction of the Y axis.
12. The method according to claim 3 or 5, It is characterized in that Execute the third routing rule, including: When the ordinate of the routing indication coordinate is less than 0 and the ordinate difference of the coordinate difference is less than 0, selecting a first north-south transmission channel along the negative direction of the Y axis from the source routing node to send the target data packet; When routing along the Y-axis direction, if the edge routing node of the dual-path Torus network is not crossed, the first north-south transmission channel for sending the target data packet is not changed; When routing along the Y-axis direction, if crossing the edge routing node of the dual-path Torus network, the first north-south transmission channel for sending the target data packet is changed to the second north-south transmission channel.
13. The method according to claim 3 or 5, It is characterized in that Execute the third routing rule, including: When the ordinate of the routing indication coordinate is less than 0 and the ordinate difference of the coordinate difference is greater than 0, the target data packet is sent through a second north-south transmission channel from the source routing node along the negative direction of the Y axis.
14. The method according to claim 3, It is characterized in that For any routing node in the target routing path, a redirection route is selected and a fourth routing rule is executed, including: If at the routing node, the transmission direction of the target data packet changes from the positive direction of the X-axis to the positive direction of the Y-axis, the target data packet transmitted based on the first west-east transmission channel selects the first north-south transmission channel for transmission, and the target data packet transmitted based on the second west-east transmission channel selects the second north-south transmission channel for transmission; If at the routing node, the transmission direction of the target data packet changes from the negative direction of the X-axis to the negative direction of the Y-axis, the target data packet transmitted based on the first east-west transmission channel selects the first north-south transmission channel for transmission, and the target data packet transmitted based on the second east-west transmission channel selects the second north-south transmission channel for transmission; If at the routing node, the transmission direction of the target data packet changes from the positive direction of the Y axis to the positive direction of the X axis, the target data packet transmitted based on the first north-south transmission channel selects the first west-east transmission channel for transmission, and the target data packet transmitted based on the second north-south transmission channel selects the second west-east transmission channel for transmission; If at the routing node, the transmission direction of the target data packet changes from the negative direction of the Y axis to the negative direction of the X axis, the target data packet transmitted based on the first north-south transmission channel selects the first east-west transmission channel for transmission, and the target data packet transmitted based on the second north-south transmission channel selects the second east-west transmission channel for transmission; If at the routing node, the transmission direction of the target data packet changes from the positive direction along the X-axis to the negative direction along the Y-axis, the target data packet transmitted based on the first west-east transmission channel selects the second north-south transmission channel for transmission, and the target data packet transmitted based on the second west-east transmission channel selects the first north-south transmission channel for transmission; If at the routing node, the transmission direction of the target data packet changes from the negative direction of the X-axis to the positive direction of the Y-axis, the target data packet transmitted based on the first east-west transmission channel selects the first north-south transmission channel for transmission, and the target data packet transmitted based on the second east-west transmission channel selects the second north-south transmission channel for transmission; If at the routing node, the transmission direction of the target data packet changes from the positive direction along the Y axis to the negative direction along the X axis, the target data packet transmitted based on the first north-south transmission channel selects the second east-west transmission channel for transmission, and the target data packet transmitted based on the second north-south transmission channel selects the first east-west transmission channel for transmission; If at the routing node, the transmission direction of the target data packet changes from the negative direction of the Y-axis to the positive direction of the X-axis, the target data packet transmitted based on the first north-south transmission channel selects the first west-east transmission channel for transmission, and the target data packet transmitted based on the second north-south transmission channel selects the second west-east transmission channel for transmission.
15. The method according to claim 1, It is characterized in that After determining the target routing path corresponding to the target data packet according to the coordinate difference and the routing indication coordinates and the preset routing rules, the method further includes: When multiple target routing paths are determined, the target routing path with the smallest current occupancy of routing nodes is selected as the final routing path corresponding to the target data packet; The target data packet is sent along the final routing path.
16. The method according to claim 1, It is characterized in that After determining the target routing path corresponding to the target data packet according to the coordinate difference and the routing indication coordinates and the preset routing rules, the method further includes: Sending the target data packet from the source routing node to the next routing node according to the target routing path, wherein, when there are multiple next routing nodes, the routing node with the smallest current occupancy is used as the next routing node to which the target data packet is sent; Using the next routing node as the updated source routing node; The routing path of the target data packet is determined in real time according to the updated coordinates of the source routing node and the coordinates of the target routing node.
17. The method according to claim 1, It is characterized in that Before determining the coordinates of the source routing node and the coordinates of the target routing node where the target data packet is located in response to the current routing request, the method further includes: Constructing a coordinate system for the topological structure of the dual-path Torus network, determining the coordinates corresponding to each routing node in the dual-path Torus network, wherein the horizontal coordinate and the vertical coordinate corresponding to each routing node are both greater than or equal to 0; For any routing node, the two channels for transmission along the positive direction of the X-axis are recorded as the first west-east transmission channel and the second west-east transmission channel, the two channels for transmission along the negative direction of the X-axis are recorded as the first east-west transmission channel and the second east-west transmission channel, the two channels for transmission along the positive direction of the Y-axis are recorded as the first north-south transmission channel and the second north-south transmission channel, and the two channels for transmission along the negative direction of the Y-axis are recorded as the first north-south transmission channel and the second north-south transmission channel.
18. The method according to claim 1 or 17, It is characterized in that Determining a coordinate difference according to the coordinates of the source routing node and the coordinates of the target routing node includes: Taking the difference between the abscissa of the target routing node and the abscissa of the source routing node as the abscissa difference; Taking the difference between the ordinate of the target routing node and the ordinate of the source routing node as the ordinate difference; The calculation formula of the coordinate difference is: (Δx,Δy)=(x D ,y D )-(x S ,y S ) (x) D -x S ,and D -and S ) Wherein, Δx is the horizontal coordinate difference, Δy is the vertical coordinate difference, (Δx, Δy) is the coordinate difference, (x D ,y D ) is the coordinate of the target routing node; (x S ,y S ) are the coordinates of the source routing node.
19. The method according to claim 1 or 17, It is characterized in that Determining routing indication coordinates according to the coordinates of the source routing node and the coordinates of the target routing node includes: When the abscissa difference of the coordinate difference is less than N / 2, the abscissa of the route indication coordinate is the abscissa difference; When the abscissa difference of the coordinate difference is greater than or equal to N / 2, the abscissa of the route indication coordinate is obtained according to N and the abscissa difference; When the ordinate difference of the coordinate difference is less than N / 2, the ordinate of the route indication coordinate is the ordinate difference; When the ordinate difference of the coordinate difference is greater than or equal to N / 2, the ordinate of the route indication coordinate is obtained according to N and the ordinate difference; The calculation formula of the routing indication coordinates is: Wherein, Δx is the horizontal coordinate difference, Δy is the vertical coordinate difference, and N is the number of routing nodes in the horizontal direction or the vertical direction in the topological structure of the dual-path Torus network.
20. A routing device for a dual-path Torus network, It is characterized in that Applied to a dual-path Torus network, in which there are dual-path links between routing nodes in the dual-path Torus network, the device comprises: A coordinate determination module, used to determine the coordinates of the source routing node and the coordinates of the target routing node where the target data packet is located in response to the current routing request; A calculation module, used to determine a coordinate difference and a routing indication coordinate according to the coordinates of the source routing node and the coordinates of the target routing node; A target routing path determination module, used to determine the target routing path corresponding to the target data packet according to the coordinate difference and the routing indication coordinates and a preset routing rule; Among them, the preset routing rules are used to determine the routing direction of the target data packet according to the routing indication coordinates, and to determine the transmission channel of the target data packet in the dual-path link according to the coordinate difference, so as to determine the shortest non-closed-loop routing path from the source routing node to the target routing node corresponding to the target data packet.
21. A server switching chip, It is characterized in that A dual-path Torus network is arranged on the chip, and the chip is used to execute the routing method of the dual-path Torus network according to any one of claims 1-19.
22. A computing device, It is characterized in that include: A memory in which a computer-readable code is stored; and one or more processors, when the computer-readable code is executed by the one or more processors, the computing processing device executes the routing method of the dual-path Torus network as described in any one of claims 1-19.
23. A non-volatile readable storage medium, It is characterized in that The non-volatile readable storage medium stores a computer program, wherein the computer program, when executed by a processor, performs the routing method of the dual-path Torus network according to any one of claims 1 to 19.
Citation Information
Cited By
Data distribution method and device, electronic equipment and storage medium
CN120416133A
Data packet transmission method and device, electronic equipment, storage medium and program product
CN122621561A
Data packet transmission method and device, electronic equipment, storage medium and program product
CN122661177A
