Routing method based on Torus network structure, Torus network structure, routing device based on Torus network structure, computer equipment and computer readable storage medium
By determining the coordinate differences between routing nodes in the Torus network structure, routing information is determined from the dual output links, which solves the deadlock problem in the Torus network and improves the accuracy and efficiency of data transmission.
Patent Information
- Application Number
- CN202410926254.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-11
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2044-07-11
AI Technical Summary
In the Torus network structure, due to the increase in "closed loop" phenomena in routing transmission, traditional routing algorithms are prone to deadlocks.
By obtaining the information to be transmitted from the current routing node, analyzing the target routing node, and determining the coordinate difference between the target routing node and the current routing node based on the node graph of the Torus network structure, thereby determining the routing information from the dual output link and reducing dead time. Lock risk.
It improves the accuracy of routing information and the smoothness of data transmission, avoids deadlocks, reduces delays and improves data throughput, and optimizes the routing performance of the Torus network structure.
Smart Images

Figure CN118474018B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network-on-chip communication technology, and in particular to a routing method based on a Torus network structure, a Torus network structure, a routing device based on a Torus network structure, a computer device and a computer-readable storage medium. Background Art
[0002] As an advanced multi-core processor communication architecture, Network-on-chip (NoC) is used to build the communication infrastructure in multi-core processors and systems on chip. It achieves efficient communication between multiple functional modules through the characteristics of high scalability, low latency and high bandwidth.
[0003] Mesh network is a typical on-chip network, where each terminal node is connected to a router. The router is both the source and sink of traffic and the transit station of traffic. Figure 1a A 4×4 two-dimensional Mesh network structure is shown in FIG. R is a router that arbitrates the flow of data and determines the transmission path of data packets in the routing network; IP is a resource node (such as a processor core or cache in a single-chip multiprocessor). The 4×4 network structure can be an N×N network structure, and N can take any value.
[0004] In a Mesh network, routing nodes and resource nodes, and routing nodes and routing nodes are connected by two independent and unidirectional links, and traditional routing algorithms are usually used to complete routing services. For example, routing can be done through an XY routing algorithm, that is, when a data packet is sent from a source node to a destination node, if routing is required in the X-dimensional direction, it is routed along the X-dimensional direction until the current node and the destination node are in the same column, and then routed along the Y-dimensional direction until it reaches the destination.
[0005] When an edge routing node in a Mesh network receives information to be transmitted, if it needs to transmit the information to the edge routing node on the other side of the network, it needs to cross multiple routing nodes to complete the routing service. In order to shorten the network transmission link and improve the network transmission performance, the following is proposed: Figure 1b The Torus network structure shown in FIG. 1 connects the head and tail nodes of the X-axis connection relationship and the head and tail nodes of the Y-axis connection relationship respectively by using corresponding surrounding links.
[0006] The current routing method in the Torus network selects the intermediate nodes that need to be routed based on the source routing node and the target routing node. Since the Torus network adds the surrounding link connection of the head and tail nodes corresponding to the X-axis connection relationship and the head and tail nodes corresponding to the Y-axis connection relationship, the "closed loop" phenomenon in the routing transmission is increased. If the traditional routing algorithm is used, deadlock is likely to occur. Summary of the invention
[0007] In view of this, the present invention provides a routing method based on a Torus network structure, a Torus network structure, a routing device based on a Torus network structure, a computer device and a computer-readable storage medium to solve the problem that deadlock is easily generated when using common traditional routing algorithms due to the increasing number of "closed loop" phenomena in routing transmission.
[0008] In a first aspect, the present invention provides a routing method based on a Torus network structure, the method comprising:
[0009] Get the information to be transmitted of the current routing node;
[0010] Parse the information to be transmitted and obtain the corresponding target routing node;
[0011] Based on the node graph corresponding to the Torus network structure, the coordinate difference between the target routing node and the current routing node is determined; wherein the node graph is used to characterize the connection relationship between routing nodes in the Torus network structure, and the routing node is connected to the adjacent routing node through a dual-path output link;
[0012] Based on the coordinate differences, the routing information is determined from the dual output links of the current routing node.
[0013] The routing method based on the Torus network structure provided in the embodiment of the present application obtains the information to be transmitted of the current routing node, and ensures the accuracy of the data transmitted by the determined routing information. The information to be transmitted is parsed to obtain the corresponding target routing node, and the accuracy of the target routing node in the determined routing information is ensured. Based on the node graph corresponding to the Torus network structure, the coordinate difference between the target routing node and the current routing node is determined, and the accuracy of the routing direction and the number of steps of the determined routing information is ensured. Among them, the node graph is used to characterize the connection relationship between the routing nodes in the Torus network structure. The routing nodes are connected to the adjacent routing nodes through a dual-channel output link, which increases the number of physical transmission links between the routing nodes and provides a physical link basis for reducing deadlock. Based on the coordinate difference, the routing information is determined from the dual-channel output link of the current routing node, which reduces the amount of data required to be processed by each output link, and also improves the smoothness of data transmission without blocking, thereby avoiding deadlock, reducing the delay when transmitting data, improving the data throughput of the routing node, and optimizing the routing performance of the Torus network structure.
[0014] In an optional implementation, determining routing information from a dual-path output link of a current routing node based on the coordinate difference includes:
[0015] Determine the routing indication coordinates based on the coordinate difference and the crossing threshold of the corresponding connection dimension in the coordinate difference;
[0016] Based on the routing indication coordinates, the routing information is determined from the dual output links of the current routing node.
[0017] The routing method based on the Torus network structure provided in the embodiment of the present application ensures the accuracy of the routing information indicated by the determined routing indication coordinates, because the routing indication coordinates are determined based on the comparison result of the coordinate difference and the crossing threshold of the corresponding connection dimension in the coordinate difference. Based on the routing indication coordinates, the routing information is determined from the dual-path output links of the current routing node, the amount of information output in each output link is limited, and the accuracy of the routing information determined from the dual-path output links is improved.
[0018] In an optional implementation, determining routing information from a dual-path output link of a current routing node based on the routing indication coordinates includes:
[0019] When the sum of the absolute values of the routing indication coordinates of the corresponding connection dimension in the routing indication coordinates is greater than 1, and there is a first connection dimension whose coordinate difference of the corresponding connection dimension is greater than 0, the first route in the dual-path output link of the routing direction of the first connection dimension of the current routing node is selected; wherein the routing direction of the first connection dimension is a routing direction having the same sign as the routing indication coordinate of the first connection dimension.
[0020] In the routing method based on the Torus network structure provided in the embodiment of the present application, the sum of the absolute values of the routing indication coordinates corresponding to the connection dimension in the routing indication coordinates is greater than 1, indicating that multiple steps of routing are required to reach the target routing node from the current routing node, and the coordinate difference corresponding to the first connection dimension is greater than 0, indicating that routing is required in the direction of the first connection dimension. At this time, the first route in the dual-path output link in the routing direction of the first connection dimension from the current routing node limits the data of the first route in the dual-path output link, reduces the amount of data from the first route in the dual-path output link, thereby reducing link congestion when the routing node performs routing, thereby avoiding deadlock.
[0021] In an optional implementation, determining routing information from a dual-path output link of a current routing node based on the routing indication coordinates includes:
[0022] When the sum of the absolute values of the routing indication coordinates of the corresponding connection dimension in the routing indication coordinates is greater than 1, and there is a second connection dimension whose coordinate difference of the corresponding connection dimension is less than 0, the second route in the dual-path output link of the routing direction of the second connection dimension of the current routing node is selected; wherein the routing direction of the second connection dimension is a routing direction having the same sign as the routing indication coordinate of the second connection dimension.
[0023] In the routing method based on the Torus network structure provided in the embodiment of the present application, the sum of the absolute values of the routing indication coordinates corresponding to the connection dimension in the routing indication coordinates is greater than 1, indicating that multiple steps of routing are required to reach the target routing node from the current routing node, and the coordinate difference corresponding to the second connection dimension is less than 0, indicating that routing is required in the direction of the second connection dimension. At this time, the second route in the dual-path output link in the routing direction of the second connection dimension from the current routing node limits the data of the second route in the dual-path output link, reduces the amount of data from the second route in the dual-path output link, thereby reducing link congestion when the routing node performs routing, thereby avoiding deadlock.
[0024] In an optional implementation, determining routing information from a dual-path output link of a current routing node based on the routing indication coordinates includes:
[0025] When the sum of the absolute values of the routing indication coordinates of the corresponding connection dimension in the routing indication coordinates is 1, route from any one of the dual output links of the current routing node indicating the routing direction, wherein the indicated routing direction is the routing direction having the same sign as the routing indication coordinates of the corresponding connection dimension whose absolute value is 1.
[0026] The routing method based on the Torus network structure provided in the embodiment of the present application indicates that when the sum of the absolute values of the routing indication coordinates of the corresponding connection dimension in the routing indication coordinates is 1, it indicates that the current routing node is directly connected to the target routing node. At this time, the indicated routing direction is the routing direction with the same sign as the routing indication coordinates of the corresponding connection dimension with an absolute value of 1, and can be routed from any of the two-way output links of the indicated routing direction of the current routing node. Considering that the short-distance routing speed is faster, the type of data transmitted from each output link is not limited on the basis of reducing the amount of data transmitted on each output link, thereby improving the efficiency of data transmission, reducing link congestion, and avoiding deadlock.
[0027] In an optional implementation, when the sum of the absolute values of the routing indication coordinates corresponding to the connection dimension in the routing indication coordinates is 1, routing is performed from any one of the two-way output links indicating the routing direction of the current routing node, wherein the indicated routing direction is a routing direction having the same sign as the routing indication coordinates corresponding to the connection dimension whose absolute value is 1, including:
[0028] When the sum of the absolute value of the routing indication coordinate corresponding to the first connection dimension and the absolute value of the routing indication coordinate corresponding to the second connection dimension in the routing indication coordinate is 1, a route is taken from any one of the dual output links indicating the routing direction of the current routing node, wherein the indicated routing direction is a routing direction having the same sign as the routing indication coordinate of the corresponding connection dimension whose absolute value is 1.
[0029] The routing method based on the Torus network structure provided in the embodiment of the present application is for the case of a two-dimensional Torus network structure. For the case where the corresponding connection dimensions are the X-axis connection dimension corresponding to the first connection dimension and the Y-axis connection dimension corresponding to the second connection dimension, a method is provided for routing from any one of the two-way output links indicating the routing direction of the current routing node when the sum of the absolute values of the routing indication coordinates corresponding to the two connection dimensions is 1, that is, when the current routing node is directly connected to the target routing node in the X-axis connection dimension or the Y-axis connection dimension. The indicated routing direction here is the routing direction with the same sign as the routing indication coordinate of the corresponding connection dimension with an absolute value of 1. Considering that the two routing nodes are directly connected, the routing speed for short-distance transmission is faster. Therefore, on the basis of reducing the amount of data transmitted in each output link, the type of data transmitted from each output link is not limited, thereby improving the efficiency of data transmission, reducing link congestion, and avoiding deadlock.
[0030] In an optional implementation, determining the routing indication coordinates based on the coordinate difference and the crossing threshold of the corresponding connection dimension in the coordinate difference includes:
[0031] When the absolute value of the coordinate difference of the corresponding connection dimension in the coordinate difference is greater than or equal to the crossing threshold of the corresponding connection dimension, the product of the sign of the coordinate difference of the corresponding connection dimension and the number of jump steps is taken as the routing indication coordinate of the corresponding connection dimension;
[0032] Among them, the crossing threshold of the corresponding connection dimension is obtained by rounding up half of the number of nodes of the corresponding connection dimension in the node graph; the number of jump steps is the number of nodes of the corresponding connection dimension in the node graph minus the absolute value of the corresponding difference.
[0033] The routing method based on the Torus network structure provided in the embodiment of the present application, when the absolute value of the coordinate difference of the corresponding connection dimension in the coordinate difference is greater than or equal to the crossing threshold of the corresponding connection dimension, it indicates that there is a cross-edge routing node in the corresponding connection dimension. The generation conditions of the routing indication coordinates are limited here to ensure the accuracy of the determined routing indication coordinates. The crossing threshold of the corresponding connection dimension is obtained by rounding up half of the number of routing nodes of the corresponding connection dimension in the node graph, which ensures the rationality and accuracy of the crossing threshold determined in the generation conditions of the routing indication coordinates. The product of the sign of the coordinate difference of the corresponding connection dimension and the number of jump steps is inverted as the routing indication coordinate of the corresponding connection dimension; the number of jump steps is the number of routing nodes of the corresponding connection dimension in the node graph minus the absolute value of the corresponding difference. Specifically, the sign of the routing indication coordinate indicates the direction of the routing, and the numerical value of the routing indication coordinate indicates the number of steps of the routing. The direction of the route indicated by the routing indication coordinates is opposite to the sign of the coordinate difference. The number of routing steps is actually the number of routing nodes of the corresponding connection dimension minus the absolute value of the corresponding difference. When crossing the edge routing node, the target routing node is reached via the shortest path from the edge routing node, thereby ensuring the rationality and accuracy of the determined first routing indication coordinates.
[0034] In an optional implementation, when the absolute value of the coordinate difference of the corresponding connection dimension in the coordinate difference is greater than or equal to the crossing threshold of the corresponding connection dimension, the product of the sign of the coordinate difference of the corresponding connection dimension and the number of jump steps is inverted as the routing indication coordinate of the corresponding connection dimension, including:
[0035]
[0036]
[0037] in, It is the routing coordinate corresponding to the X-axis connection dimension in the routing coordinate. is the routing indication coordinate corresponding to the Y-axis connection dimension in the routing indication coordinate; is the coordinate difference corresponding to the X-axis connection dimension in the coordinate difference, is the coordinate difference corresponding to the Y-axis connection dimension in the coordinate difference, is the absolute value of the coordinate difference corresponding to the X-axis connection dimension in the coordinate difference, is the absolute value of the coordinate difference corresponding to the Y-axis connection dimension in the coordinate difference, is the number of routing nodes corresponding to the X-axis and Y-axis connection dimensions in the node graph, It is the crossing threshold corresponding to the connection dimension of X-axis and Y-axis. The coordinate difference of the corresponding X-axis connection dimension is greater than or equal to the crossing threshold of the corresponding X-axis connection dimension. The coordinate difference of the corresponding Y-axis connection dimension is greater than or equal to the crossing threshold of the corresponding Y-axis connection dimension. is the sign of the coordinate difference corresponding to the X-axis connection dimension, is the sign of the coordinate difference corresponding to the Y-axis connection dimension, is the number of jump steps corresponding to the X-axis connection dimension, is the number of jump steps corresponding to the Y-axis connection dimension, It is the product of the sign of the coordinate difference corresponding to the X-axis connection dimension and the number of jump steps. It is the product of the sign of the coordinate difference corresponding to the Y-axis connection dimension and the number of jump steps.
[0038] The routing method based on the Torus network structure provided in the embodiment of the present application provides generation conditions and formulas for routing indication coordinates for the case of a two-dimensional Torus network structure, where the corresponding connection dimensions are the X-axis connection dimension and the Y-axis connection dimension, respectively. The routing direction and the number of routing steps indicated by the routing indication coordinates ensure reverse routing when the X-axis connection dimension and / or the Y-axis connection dimension cross the edge routing node, thereby ensuring the accuracy of the generated routing indication coordinates.
[0039] In an optional implementation, determining the routing indication coordinates based on the coordinate difference and the crossing threshold of the corresponding connection dimension in the coordinate difference includes:
[0040] When the absolute value of the coordinate difference of the corresponding connection dimension in the coordinate difference is less than the crossing threshold of the corresponding connection dimension, the coordinate difference of the corresponding connection dimension is used as the routing indication coordinate of the corresponding connection dimension.
[0041] The routing method based on the Torus network structure provided in the embodiment of the present application defines the generation conditions of the routing indication coordinates when the absolute value of the coordinate difference of the corresponding connection dimension in the coordinate difference is less than the crossing threshold of the corresponding connection dimension, thereby ensuring the accuracy of the determined routing indication coordinates. The coordinate difference of the corresponding connection dimension is used as the routing indication coordinate of the corresponding connection dimension, wherein the sign of the routing indication coordinate indicates the direction of the routing, and the numerical value of the routing indication coordinate indicates the number of steps of the routing, thereby ensuring that when the absolute value of the coordinate difference is less than the crossing threshold, the routing is performed according to the direction of the routing indicated by the sign of the routing indication coordinate and the number of steps of the routing indicated by the numerical value of the routing indication coordinate, thereby achieving the shortest path from the edge routing node to the target routing node, thereby ensuring the rationality and accuracy of the determined routing indication coordinates.
[0042] In an optional implementation, when the absolute value of the coordinate difference of the corresponding connection dimension in the coordinate difference is less than the crossing threshold of the corresponding connection dimension, the coordinate difference of the corresponding connection dimension is used as the routing indication coordinate of the corresponding connection dimension, including:
[0043]
[0044]
[0045] in, It is the routing coordinate corresponding to the X-axis connection dimension in the routing coordinate. is the routing indication coordinate corresponding to the Y-axis connection dimension in the routing indication coordinate; is the coordinate difference corresponding to the X-axis connection dimension in the coordinate difference, is the coordinate difference corresponding to the Y-axis connection dimension in the coordinate difference, is the absolute value of the coordinate difference corresponding to the X-axis connection dimension in the coordinate difference, is the absolute value of the coordinate difference corresponding to the Y-axis connection dimension in the coordinate difference, is the number of routing nodes corresponding to the X and Y axis connection dimensions in the node graph, It is the crossing threshold corresponding to the connection dimension of X and Y axes.
[0046] The routing method based on the Torus network structure provided in the embodiment of the present application provides generation conditions and formulas for routing indication coordinates for the corresponding connection dimensions, which are the X-axis connection dimension and the Y-axis connection dimension, respectively, for a two-dimensional Torus network structure. The routing direction and the number of routing steps determined based on the routing indication coordinates ensure forward routing when the X-axis connection dimension and / or the Y-axis connection dimension do not cross the edge routing node, thereby ensuring the accuracy of the generated routing indication coordinates.
[0047] In a second aspect, the present invention provides a Torus network structure, which includes a plurality of routing nodes; the routing nodes are provided with dual-path output links to connect with adjacent routing nodes;
[0048] Get the information to be transmitted of the current routing node;
[0049] Parse the information to be transmitted and obtain the corresponding target routing node;
[0050] Based on the node graph corresponding to the Torus network structure, determine the coordinate difference between the target routing node and the current routing node, where the node graph is used to represent the connection relationship between routing nodes in the Torus network structure;
[0051] Based on the coordinate differences, the routing information is determined from the dual output links of the current routing node.
[0052] The Torus network structure provided in the embodiment of the present application includes multiple routing nodes in the Torus network structure; the routing nodes are provided with dual-path output links to connect with adjacent routing nodes, which increases the number of physical transmission links between routing nodes and provides a physical link basis for reducing deadlock. The information to be transmitted of the current routing node is obtained to ensure the accuracy of the data transmitted by the determined routing information. The information to be transmitted is parsed to obtain the corresponding target routing node, which ensures the accuracy of the target routing node in the determined routing information. Based on the node graph corresponding to the Torus network structure, the coordinate difference between the target routing node and the current routing node is determined to ensure the accuracy of the routing direction and the number of steps of the determined routing information. Among them, the node graph is used to characterize the connection relationship between the routing nodes in the Torus network structure. Based on the coordinate difference, the routing information is determined from the dual-path output link of the current routing node, which reduces the amount of data required to be processed by each output link, and also improves the smoothness of data transmission without blocking, thereby avoiding deadlock, reducing the delay when transmitting data, improving the data throughput of the routing node, and optimizing the routing performance of the Torus network structure.
[0053] In an optional implementation, when performing routing, the Torus network structure determines routing indication coordinates based on coordinate differences and crossing thresholds of corresponding connection dimensions in the coordinate differences; based on the routing indication coordinates, determines routing information from dual-path output links of the current routing node.
[0054] The Torus network structure provided in the embodiment of the present application ensures the accuracy of the routing information indicated by the determined routing indication coordinates because the routing indication coordinates are determined based on the comparison result of the coordinate difference and the crossing threshold of the corresponding connection dimension in the coordinate difference when the Torus network structure performs routing. Based on the routing indication coordinates, the routing information is determined from the dual-path output links of the current routing node, the amount of information output in each output link is limited, and the accuracy of the routing information determined from the dual-path output links is improved.
[0055] In an optional embodiment, when the Torus network structure is performing routing, when the sum of the absolute values of the routing indication coordinates of the corresponding connection dimension in the routing indication coordinates is greater than 1, and there is a first connection dimension in which the coordinate difference of the corresponding connection dimension is greater than 0, the first route in the dual output links of the routing direction of the first connection dimension of the current routing node is used; wherein the routing direction of the first connection dimension is a routing direction having the same sign as the routing indication coordinates of the first connection dimension.
[0056] The Torus network structure provided in the embodiment of the present application has a Torus network structure in which, when routing, the sum of the absolute values of the routing indication coordinates corresponding to the connection dimension in the routing indication coordinates is greater than 1, indicating that multiple steps of routing are required from the current routing node to reach the target routing node, and the coordinate difference corresponding to the first connection dimension is greater than 0, indicating that routing is required in the direction of the first connection dimension. At this time, the first route in the dual-path output link in the routing direction of the first connection dimension from the current routing node limits the data of the first route in the dual-path output link, reduces the amount of data from the first route in the dual-path output link, thereby reducing link congestion when the routing node performs routing, thereby avoiding deadlock.
[0057] In an optional embodiment, when the Torus network structure is performing routing, when the sum of the absolute values of the routing indication coordinates of the corresponding connection dimension in the routing indication coordinates is greater than 1, and there is a second connection dimension whose coordinate difference of the corresponding connection dimension is less than 0, the second route in the dual output link of the routing direction of the second connection dimension of the current routing node is used; wherein the routing direction of the second connection dimension is a routing direction having the same sign as the routing indication coordinate of the second connection dimension.
[0058] The Torus network structure provided in the embodiment of the present application has a Torus network structure in which, when routing, the sum of the absolute values of the routing indication coordinates corresponding to the connection dimension in the routing indication coordinates is greater than 1, indicating that multiple steps of routing are required from the current routing node to reach the target routing node, and the coordinate difference corresponding to the second connection dimension is less than 0, indicating that routing is required in the direction of the second connection dimension. At this time, the second route in the dual-path output link in the routing direction of the second connection dimension from the current routing node limits the data of the second route in the dual-path output link, reduces the amount of data from the second route in the dual-path output link, thereby reducing link congestion when the routing node performs routing, thereby avoiding deadlock.
[0059] In an optional embodiment, when the Torus network structure is performing routing, when the sum of the absolute values of the routing indication coordinates of the corresponding connection dimension in the routing indication coordinates is 1, routing is performed from any one of the dual output links indicating the routing direction of the current routing node, wherein the indicated routing direction is a routing direction having the same sign as the routing indication coordinates of the corresponding connection dimension whose absolute value is 1.
[0060] The Torus network structure provided in the embodiment of the present application, when the Torus network structure is routing, when the sum of the absolute values of the routing indication coordinates corresponding to the connection dimension in the routing indication coordinates is 1, it indicates that the current routing node is directly connected to the target routing node, and the indicated routing direction is the routing direction with the same sign as the routing indication coordinates corresponding to the connection dimension with an absolute value of 1, and can be routed from any of the two-way output links of the indicated routing direction of the current routing node. Considering that the short-distance routing speed is faster, the type of data transmitted from each output link is not limited on the basis of reducing the amount of data transmitted from each output link, thereby improving the efficiency of data transmission, reducing link congestion, and avoiding deadlock.
[0061] In an optional embodiment, when the Torus network structure is performing routing, when the sum of the absolute value of the routing indication coordinate corresponding to the first connection dimension and the absolute value of the routing indication coordinate corresponding to the second connection dimension in the routing indication coordinate is 1, routing is performed from any one of the dual output links indicating the routing direction of the current routing node, wherein the indicated routing direction is a routing direction having the same sign as the routing indication coordinate of the corresponding connection dimension whose absolute value is 1.
[0062] The Torus network structure provided in the embodiment of the present application, when the Torus network structure performs routing, for the case of a two-dimensional Torus network structure, for the case where the corresponding connection dimensions are the X-axis connection dimension corresponding to the first connection dimension and the Y-axis connection dimension corresponding to the second connection dimension, a routing indication coordinate corresponding to the two connection dimensions is given when the sum of the absolute values of the routing indication coordinates is 1, that is, when the current routing node is directly connected to the target routing node in the X-axis connection dimension or the Y-axis connection dimension, the current routing node is routed from any of the two-way output links indicating the routing direction, where the indicated routing direction is the routing direction with the same sign as the routing indication coordinate of the corresponding connection dimension with an absolute value of 1. Considering that the two routing nodes are directly connected, the routing speed for short-distance transmission is faster, so on the basis of reducing the amount of data transmitted in each output link, the type of data transmitted from each output link is not limited, thereby improving the efficiency of data transmission, reducing link congestion, and avoiding deadlock.
[0063] In an optional implementation, when the Torus network structure performs routing, when the absolute value of the coordinate difference of the corresponding connection dimension in the coordinate difference is greater than or equal to the crossing threshold of the corresponding connection dimension, the product of the sign of the coordinate difference of the corresponding connection dimension and the number of jump steps is taken as the routing indication coordinate of the corresponding connection dimension;
[0064] Among them, the crossing threshold of the corresponding connection dimension is obtained by rounding up half of the number of nodes of the corresponding connection dimension in the node graph; the number of jump steps is the number of nodes of the corresponding connection dimension in the node graph minus the absolute value of the corresponding difference.
[0065] The Torus network structure provided in the embodiment of the present application, when the Torus network structure is routing, when the absolute value of the coordinate difference of the corresponding connection dimension in the coordinate difference is greater than or equal to the crossing threshold of the corresponding connection dimension, it indicates that there is a cross-edge routing node in the corresponding connection dimension. The generation conditions of the routing indication coordinates are limited here to ensure the accuracy of the determined routing indication coordinates. The crossing threshold of the corresponding connection dimension is obtained by rounding up half of the number of routing nodes of the corresponding connection dimension in the node graph, which ensures the rationality and accuracy of the crossing threshold determined in the generation conditions of the routing indication coordinates. The product of the sign of the coordinate difference of the corresponding connection dimension and the number of jump steps is inverted as the routing indication coordinate of the corresponding connection dimension; the number of jump steps is the number of routing nodes of the corresponding connection dimension in the node graph minus the absolute value of the corresponding difference. Specifically, the sign of the routing indication coordinate indicates the direction of routing, and the value of the routing indication coordinate indicates the number of steps of routing. The direction of the route indicated by the routing indication coordinates is opposite to the sign of the coordinate difference. The number of routing steps is actually the number of routing nodes of the corresponding connection dimension minus the absolute value of the corresponding difference. This ensures that when crossing the edge routing node, the target routing node can be reached via the shortest path from the edge routing node, thereby ensuring the rationality and accuracy of the determined routing indication coordinates.
[0066] In an optional implementation, when the Torus network structure performs routing, when the absolute value of the coordinate difference of the corresponding connection dimension in the coordinate difference is less than the crossing threshold of the corresponding connection dimension, the coordinate difference of the corresponding connection dimension is used as the routing indication coordinate of the corresponding connection dimension.
[0067] The Torus network structure provided in the embodiment of the present application defines the generation conditions of the routing indication coordinates when the absolute value of the coordinate difference of the corresponding connection dimension in the coordinate difference is less than the crossing threshold of the corresponding connection dimension during routing, thereby ensuring the accuracy of the determined routing indication coordinates. The coordinate difference of the corresponding connection dimension is used as the routing indication coordinate of the corresponding connection dimension, wherein the sign of the routing indication coordinate indicates the direction of routing, and the numerical value of the routing indication coordinate indicates the number of steps of routing, thereby ensuring that when the absolute value of the coordinate difference is less than the crossing threshold, routing is performed according to the direction of routing indicated by the sign of the routing indication coordinate and the number of steps of routing indicated by the numerical value of the routing indication coordinate, thereby achieving the shortest path from the edge routing node to the target routing node, thereby ensuring the rationality and accuracy of the determined routing indication coordinates.
[0068] In a third aspect, the present invention provides a routing device based on a Torus network structure, the device comprising:
[0069] An information acquisition unit, used to acquire the information to be transmitted of the current routing node;
[0070] An information parsing unit, used to parse the information to be transmitted and obtain the corresponding target routing node;
[0071] A difference determination unit, for determining the coordinate difference between the target routing node and the current routing node based on a node graph corresponding to the Torus network structure; wherein the node graph is used to characterize the connection relationship between routing nodes in the Torus network structure, and the routing node is connected to the adjacent routing node through a dual-path output link;
[0072] The route determination unit is used to determine the route information from the dual output links of the current route node based on the coordinate difference.
[0073] The routing device based on the Torus network structure provided in the embodiment of the present application includes an information acquisition unit for acquiring the information to be transmitted of the current routing node, thereby ensuring the accuracy of the data transmitted by the determined routing information. An information parsing unit is used to parse the information to be transmitted and obtain the corresponding target routing node, thereby ensuring the accuracy of the target routing node in the determined routing information. A difference determination unit is used to determine the coordinate difference between the target routing node and the current routing node based on the node graph corresponding to the Torus network structure, thereby ensuring the accuracy of the routing direction and the number of steps of the determined routing information. Among them, the node graph is used to characterize the connection relationship between the routing nodes in the Torus network structure. The routing nodes in the node graph are connected to the adjacent routing nodes through dual-path output links, thereby increasing the number of physical transmission links when routing between two routing nodes, thereby providing a physical link basis for reducing deadlock. The routing determination unit is used to determine the routing information from the dual output links of the current routing node based on the coordinate difference, and realizes the determination of the output link of the current routing node when routing according to the coordinate difference, thereby decomposing the data that the current routing node needs to transmit when routing, reducing the amount of data that needs to be processed by each output link, and improving the smoothness of the data transmitted by the current routing node without blocking, avoiding the deadlock caused by the single link connection, thereby reducing the delay in data transmission, improving the data throughput of the current routing node, and optimizing the routing performance of the Torus network structure.
[0074] In a fourth aspect, the present invention provides an electronic device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the routing method based on the Torus network structure of the above-mentioned first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0075] In a fifth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the routing method based on the Torus network structure of the above-mentioned first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0076] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0077] Figure 1a is a schematic diagram of a 4×4 two-dimensional Mesh network structure implementation solution in a traditional solution according to an embodiment of the present invention;
[0078] Figure 1b is a schematic diagram of an implementation scheme of a closed-loop structure of a two-dimensional Mesh network in a traditional scheme according to an embodiment of the present invention;
[0079] Figure 1c is a schematic diagram of an implementation scheme of a 5×5 two-dimensional Torus network structure in a traditional scheme according to an embodiment of the present invention;
[0080] Figure 2a is a flow chart of a routing method based on a Torus network structure according to an embodiment of the present invention;
[0081] Figure 2b is a schematic diagram of an implementation scheme of a 5×5 two-dimensional Torus network structure according to an embodiment of the present invention;
[0082] Figure 2c is a schematic diagram of an implementation scheme of a connection link between a routing node and an adjacent routing node according to an embodiment of the present invention;
[0083] Figure 3 is a flow chart of another routing method based on a Torus network structure according to an embodiment of the present invention;
[0084] Figure 4is a structural block diagram of a routing device based on a Torus network structure according to an embodiment of the present invention;
[0085] Figure 5 It is a schematic diagram of the hardware structure of the electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0086] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0087] Since the on-chip network has only been around for a few decades, it is still in the theoretical research stage internationally, and only in recent years has a small number of scientific research departments in China begun to conduct some research on related technologies. Overall, the research on on-chip networks is still in its infancy, and the related theories and technologies are not very mature. However, following the development trend from single machines to networks, it is believed that on-chip networks will become a key technology and be widely used in the near future, so it is still necessary to conduct relevant research on it.
[0088] like Figure 1a As shown, Figure 1a The figure shows the topology of a 4×4 two-dimensional Mesh network-on-chip. In the figure, R represents a router, which arbitrates the flow of data and determines the transmission path of data packets within the routing network; IP represents a resource node, which can send and receive data. The lines in the figure are all bidirectional, that is, full-duplex. Each router uses a link to connect a resource node. Routing nodes and resource nodes, and routing nodes and routing nodes are connected through two independent and unidirectional links.
[0089] In an actual Mesh network, the number of routing nodes N corresponding to the connection dimension can be arbitrarily large, as long as each routing node is connected to a resource node. However, as N increases, the diameter and scale of the network also increase, which will have a great impact on the network's latency, power consumption and other performance. Due to the simple composition structure of the Mesh network, it has been widely used in small-scale network environments.
[0090] Routing algorithm generally refers to the transmission of data between routers R, so we will only consider the transmission of data between routers R in the following. Routing algorithm is one of the key research contents of NoC researchers. When the network topology is determined, the routing algorithm determines the transmission path of the message packet in the network. It will select the intermediate node that needs to be routed according to the source node and the target node. In other words, the routing algorithm is to select the intermediate node and transmit information to the target node on the premise of selecting the appropriate node. The purpose of this is to ensure that the network delay of the data packet, the power consumption required during the delivery process, the data throughput rate and the reliability can 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. At the same time, a good routing algorithm can effectively avoid problems such as deadlock that reduce chip performance.
[0091] Because the mesh structure has a "closed loop", deadlock may occur. For example, Figure 1b As shown, Figure 1b The schematic diagram exemplarily shows the implementation scheme of the closed-loop structure of the embodiment of the present invention. Figure 1b In the figure, the ring topology includes four routing nodes, namely routing node 2, routing node 3, routing node 6, and routing node 7. Assume that there are four routing requests at the same time: request 1 is from routing node 2 to routing node 7; request 2 is from routing node 3 to routing node 6; request 3 is from routing node 7 to routing node 2; request 4 is from routing node 6 to routing node 3. 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 occurs. On the contrary, if all choose counterclockwise routing and all have occupied the middle routing node, a deadlock will also occur.
[0092] The XY routing algorithm can avoid deadlock. For a two-dimensional grid topology network on chip, each router has a coordinate (x, y) that uniquely corresponds to it. XY routing is a classic deterministic routing algorithm. First, the message packet will compare the X-axis coordinate of the source node where it is located with the X-axis target 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 to the east. If the X-axis coordinate of the source node is larger than the X-axis coordinate of the destination node, it will be routed to the west. When the message packet is routed to the same X-axis coordinate as the destination node, it will be transmitted to the Y axis. At this time, if the Y-axis coordinate of the message packet is smaller than the Y-axis coordinate of the destination node, the message packet will choose to continue to be transmitted to the north. If the Y-axis coordinate of the message packet is larger than the Y-axis coordinate of the destination node, the message packet will choose to be transmitted to the south. This routing algorithm has low latency and can prevent possible problems such as deadlock, livelock and starvation.
[0093] In a mesh network, if a service request occurs at the four corners of the network, since there is no line link between them, it is necessary to cross half of the network to complete the routing service. To overcome this shortcoming, further shorten the network diameter and improve network performance, the Torus network is proposed. Figure 1c As shown, Figure 1c A 5×5 two-dimensional Torus network topology structure, that is, a two-dimensional Torus network node diagram, is shown as an example.
[0094] The Torus network is an improvement on the mesh network. The nodes corresponding horizontally and vertically on the sides of the square structure are connected by links, thereby shortening the diameter of the network, reducing the delay and power consumption of network transmission, and improving the performance of the network. The "closed loop" phenomenon of the Torus structure is more frequent than that of the mesh, and is more prone to deadlock. If the traditional XY routing algorithm of the mesh network is still used, deadlock will still occur. Therefore, the present invention improves the XY routing algorithm and proposes a routing algorithm suitable for the Torus structure to avoid deadlock.
[0095] According to an embodiment of the present invention, a routing method embodiment based on a Torus network structure is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0096] It should be noted that the routing method based on the Torus network structure provided in the embodiment of the present application may be implemented by a routing device based on the Torus network structure, and the routing device based on the Torus network structure may be implemented by a routing node. In the following method embodiments, the execution subject is taken as an example of a routing node.
[0097] In this embodiment, a routing method based on a Torus network structure is provided, which can be used for the above-mentioned electronic device. Figure 2a is a flow chart of a routing method based on a Torus network structure according to an embodiment of the present invention. Figure 2a As shown, the process includes the following steps:
[0098] Step S101, obtaining information to be transmitted of the current routing node.
[0099] The input end of the current routing node may receive information to be transmitted from the previous routing node. Specifically, the message to be transmitted may be a message or data group transmitted between routing nodes of the Torus network structure.
[0100] Step S102, parsing the information to be transmitted to obtain the corresponding target routing node.
[0101] The header data of the message to be transmitted usually includes information indicating the target routing node.
[0102] Step S103, based on the node graph corresponding to the Torus network structure, determine the coordinate difference between the target routing node and the current routing node.
[0103] Among them, the node graph is used to represent the connection relationship between routing nodes in the Torus network structure, and the routing nodes are connected to adjacent routing nodes through dual-path output links.
[0104] The dimension of the Torus network structure and the number of routing nodes therein can be the dimension of the Torus network structure and the number of routing nodes therein in the existing technology or future development technology, and this application does not limit this. For example, the Torus network structure can be a common two-dimensional plane N×N network structure, or a three-dimensional solid N×N×N network structure, or an M-dimensional N×N×…×N (M N) network structure, where N can take any value.
[0105] The routing nodes in the node graph corresponding to the Torus network structure usually use coordinates to indicate the location of the routing node in the node graph. Therefore, based on the node graph corresponding to the Torus network structure, the coordinates of the target routing node and the coordinates of the current routing node can be obtained. Then, the coordinate difference between the target routing node and the current routing node is obtained by subtracting the coordinates of the current routing node from the coordinates of the target routing node.
[0106] like Figure 2b As shown, Figure 2b The node diagram of a 5×5 two-dimensional Torus network structure in the embodiment of the present application is exemplarily shown. The routing nodes in the node diagram are connected to adjacent routing nodes through bold dual-path output links, and each routing node uses coordinates to represent its position in the node diagram. Specifically, Figure 2c As shown, Figure 2c It is shown that the routing nodes in the node graph are connected to adjacent routing nodes through dual output links (0,1 output links).
[0107] Step S104, based on the coordinate difference, determining routing information from the dual output links of the current routing node.
[0108] The coordinate difference between the destination routing node and the current routing node includes the coordinate difference in all connection dimensions. Taking the two-dimensional Torus network structure as an example, the coordinate difference can be the coordinate of the destination routing node. With the current routing node coordinates The difference :
[0109]
[0110] After the coordinate difference is determined, the coordinate difference can be used as a basis for determining an output link from the current routing node during information transmission, and information to be transmitted is allocated to each output link in the dual output links.
[0111] Specifically, those skilled in the art may allocate information to be transmitted to each output link in the dual output links based on the characteristics of the coordinate difference, such as the size of the coordinate difference, the indicated routing direction, etc., and according to experience or preset rules, and this application does not limit this.
[0112] The routing method based on the Torus network structure provided in the embodiment of the present application obtains the information to be transmitted of the current routing node, and ensures the accuracy of the data transmitted by the determined routing information. The information to be transmitted is parsed to obtain the corresponding target routing node, and the accuracy of the target routing node in the determined routing information is ensured. Based on the node graph corresponding to the Torus network structure, the coordinate difference between the target routing node and the current routing node is determined, and the accuracy of the routing direction and the number of steps of the determined routing information is ensured. Among them, the node graph is used to characterize the connection relationship between the routing nodes in the Torus network structure. The routing nodes are connected to the adjacent routing nodes through a dual-channel output link, which increases the number of physical transmission links between the routing nodes and provides a physical link basis for reducing deadlock. Based on the coordinate difference, the routing information is determined from the dual-channel output link of the current routing node, which reduces the amount of data required to be processed by each output link, and also improves the smoothness of data transmission without blocking, thereby avoiding deadlock, reducing the delay when transmitting data, improving the data throughput of the routing node, and optimizing the routing performance of the Torus network structure.
[0113] In this embodiment, a routing method based on a Torus network structure is provided, which can be used for the above-mentioned electronic device. Figure 3 is a flow chart of a routing method based on a Torus network structure according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps:
[0114] Step S201, obtaining information to be transmitted of the current routing node.
[0115] The input end of the current routing node may receive information to be transmitted from the previous routing node. Specifically, the message to be transmitted may be a message or data group transmitted between routing nodes of the Torus network structure.
[0116] Step S202, parsing the information to be transmitted to obtain the corresponding target routing node.
[0117] The header data of the message to be transmitted usually includes information indicating the target routing node.
[0118] Step S203, based on the node graph corresponding to the Torus network structure, determine the coordinate difference between the target routing node and the current routing node.
[0119] Among them, the node graph is used to represent the connection relationship between routing nodes in the Torus network structure, and the routing nodes are connected to adjacent routing nodes through dual-path output links.
[0120] The dimension of the Torus network structure and the number of routing nodes therein may be the dimension of the Torus network structure and the number of routing nodes therein in the prior art or in the future development of the technology, and this application does not limit this. Figure 2a Step S103 of the illustrated embodiment will not be described in detail here.
[0121] Step S204: determining the routing indication coordinates based on the coordinate difference and the crossing threshold of the corresponding connection dimension in the coordinate difference.
[0122] The routing indication coordinates are determined based on the coordinate difference and the crossing threshold of the corresponding connection dimension in the coordinate difference. That is, the generation of the routing indication coordinates depends on the comparison result of the coordinate difference and the crossing threshold of the corresponding connection dimension in the coordinate difference (the crossing threshold can be determined according to the actual experience or preset rules of those skilled in the art).
[0123] When the comparison result of the crossing threshold of the coordinate difference and the corresponding connection dimension in the coordinate difference meets the preset conditions, the routing indication coordinates that are convenient for indicating the routing transmission information can be constructed according to the preset conditions, based on the routing indicators that the routing node needs to consider when routing, such as information transmission efficiency (routing direction and number of routing steps), probability of congestion (transmission efficiency of closed-loop links), etc., and then according to the experience of technical personnel in this field or preset rules.
[0124] Step S205: determining routing information from the dual-path output links of the current routing node based on the routing indication coordinates.
[0125] Among them, the routing indication coordinates can subdivide the transmission links of the routing transmission path based on the data type of the information to be transmitted, the connection method of the transmission path, etc., on the basis of indicating the routing transmission information and determining the routing transmission path, thereby reducing the amount of data transmitted by each transmission link in the dual-path output link of the current routing node.
[0126] The routing method based on the Torus network structure provided in the embodiment of the present application ensures the accuracy of the routing information indicated by the determined routing indication coordinates, because the routing indication coordinates are determined based on the comparison result of the coordinate difference and the crossing threshold of the corresponding connection dimension in the coordinate difference. Based on the routing indication coordinates, the routing information is determined from the dual-path output links of the current routing node, the amount of information output in each output link is limited, and the accuracy of the routing information determined from the dual-path output links is improved.
[0127] In the routing method based on the Torus network structure provided in the above embodiment of the present application, alternatively or additionally, the above step S204 may include step S2041 and / or step S2042:
[0128] Step S2041, when the absolute value of the coordinate difference corresponding to the connection dimension in the coordinate difference is greater than or equal to the crossing threshold of the corresponding connection dimension, the product of the sign of the coordinate difference corresponding to the connection dimension and the jump step number is taken as the routing indication coordinate of the corresponding connection dimension;
[0129] The crossing threshold of the corresponding connection dimension is obtained by rounding up half of the number of nodes of the corresponding connection dimension in the node graph. The number of jump steps is the number of nodes of the corresponding connection dimension in the node graph minus the absolute value of the corresponding difference.
[0130] Specifically, if the absolute value of the coordinate difference of the corresponding connection dimension in the coordinate difference is greater than or equal to the crossing threshold of the corresponding connection dimension, it indicates that the number of routing steps from the current routing node to the target routing node is large, and there is a situation where the coordinate difference of the corresponding connection dimension crosses the edge routing node. In order to achieve the shortest routing path, the routing indication coordinates corresponding to the reverse routing can be generated, and the jump steps of the reverse routing can be adaptively adjusted. The sign of the routing indication coordinate indicates the direction of the routing, and the value of the routing indication coordinate indicates the number of routing steps.
[0131] The routing method based on the Torus network structure provided in the embodiment of the present application, when the absolute value of the coordinate difference of the corresponding connection dimension in the coordinate difference is greater than or equal to the crossing threshold of the corresponding connection dimension, it indicates that there is a cross-edge routing node in the corresponding connection dimension, which limits the generation conditions of the routing indication coordinates and ensures the accuracy of the determined routing indication coordinates. The crossing threshold of the corresponding connection dimension is obtained by rounding up half of the number of routing nodes of the corresponding connection dimension in the node graph, which ensures the rationality and accuracy of the crossing threshold determined in the generation conditions of the routing indication coordinates. The product of the sign of the coordinate difference of the corresponding connection dimension and the number of jump steps is inverted as the routing indication coordinate of the corresponding connection dimension; the number of jump steps is the number of routing nodes of the corresponding connection dimension in the node graph minus the absolute value of the corresponding difference, which realizes that when the number of routing steps is large and the cross-edge routing node is crossed, the target routing node is reached from the current routing node via the shortest path, thereby ensuring the rationality and accuracy of the determined routing indication coordinates.
[0132] In some specific implementations of the above step S2041, the above step S2041 may further include:
[0133]
[0134]
[0135] in, It is the routing coordinate corresponding to the X-axis connection dimension in the routing coordinate. is the routing indication coordinate corresponding to the Y-axis connection dimension in the routing indication coordinate; is the coordinate difference corresponding to the X-axis connection dimension in the coordinate difference, is the coordinate difference corresponding to the Y-axis connection dimension in the coordinate difference, is the absolute value of the coordinate difference corresponding to the X-axis connection dimension in the coordinate difference, is the absolute value of the coordinate difference corresponding to the Y-axis connection dimension in the coordinate difference, is the number of routing nodes corresponding to the X-axis and Y-axis connection dimensions in the node graph, It is the crossing threshold corresponding to the connection dimension of X-axis and Y-axis. The coordinate difference of the corresponding X-axis connection dimension is greater than or equal to the crossing threshold of the corresponding X-axis connection dimension. The coordinate difference of the corresponding Y-axis connection dimension is greater than or equal to the crossing threshold of the corresponding Y-axis connection dimension. is the sign of the coordinate difference corresponding to the X-axis connection dimension, is the sign of the coordinate difference corresponding to the Y-axis connection dimension, is the number of jump steps corresponding to the X-axis connection dimension, is the number of jump steps corresponding to the Y-axis connection dimension, It is the product of the sign of the coordinate difference corresponding to the X-axis connection dimension and the number of jump steps. It is the product of the sign of the coordinate difference corresponding to the Y-axis connection dimension and the number of jump steps.
[0136] The routing method based on the Torus network structure provided in the embodiment of the present application provides generation conditions and formulas for routing indication coordinates for the case of a two-dimensional Torus network structure, where the corresponding connection dimensions are the X-axis connection dimension and the Y-axis connection dimension, respectively. The routing direction and the number of routing steps indicated by the routing indication coordinates ensure reverse routing when the X-axis connection dimension and / or the Y-axis connection dimension cross the edge routing node, thereby ensuring the accuracy of the generated routing indication coordinates.
[0137] Step S2042: when the absolute value of the coordinate difference corresponding to the connection dimension in the coordinate difference is less than the crossing threshold of the corresponding connection dimension, the coordinate difference corresponding to the connection dimension is used as the routing indication coordinate of the corresponding connection dimension.
[0138] Among them, the absolute value of the coordinate difference of the corresponding connection dimension in the coordinate difference is less than the crossing threshold of the corresponding connection dimension, indicating that the number of routing steps from the current routing node to the target routing node is small, and there is no situation where the coordinate difference of the corresponding connection dimension crosses the edge routing node. In order to achieve the shortest routing path, the routing indication coordinates of the direct forward routing can be generated, the sign of the routing indication coordinates indicates the direction of the routing, and the value of the routing indication coordinates indicates the number of routing steps.
[0139] The routing method based on the Torus network structure provided in the embodiment of the present application defines the generation conditions of the routing indication coordinates when the absolute value of the coordinate difference of the corresponding connection dimension in the coordinate difference is less than the crossing threshold of the corresponding connection dimension, thereby ensuring the accuracy of the determined routing indication coordinates. The coordinate difference of the corresponding connection dimension is used as the routing indication coordinate of the corresponding connection dimension, so as to achieve the shortest path from the edge routing node to the target routing node, thereby ensuring the rationality and accuracy of the determined routing indication coordinates.
[0140] In some specific implementations of the above step S2042, the above step S2042 may further include:
[0141]
[0142]
[0143] in, It is the routing coordinate corresponding to the X-axis connection dimension in the routing coordinate. is the routing indication coordinate corresponding to the Y-axis connection dimension in the routing indication coordinate; is the coordinate difference corresponding to the X-axis connection dimension in the coordinate difference, is the coordinate difference corresponding to the Y-axis connection dimension in the coordinate difference, is the absolute value of the coordinate difference corresponding to the X-axis connection dimension in the coordinate difference, is the absolute value of the coordinate difference corresponding to the Y-axis connection dimension in the coordinate difference, is the number of routing nodes corresponding to the X and Y axis connection dimensions in the node graph, It is the crossing threshold corresponding to the connection dimension of X and Y axes.
[0144] The routing method based on the Torus network structure provided in the embodiment of the present application provides generation conditions and formulas for routing indication coordinates for the corresponding connection dimensions, which are the X-axis connection dimension and the Y-axis connection dimension, respectively, for a two-dimensional Torus network structure. The routing direction and the number of routing steps determined based on the routing indication coordinates ensure forward routing when the X-axis connection dimension and / or the Y-axis connection dimension do not cross the edge routing node, thereby ensuring the accuracy of the generated routing indication coordinates.
[0145] In the routing method based on the Torus network structure provided in the above embodiment of the present application, alternatively or additionally, the above step S205 may include:
[0146] Step S2051, when the sum of the absolute values of the routing indication coordinates of the corresponding connection dimension in the routing indication coordinates is greater than 1, and there is a first connection dimension whose coordinate difference of the corresponding connection dimension is greater than 0, a first route in the dual-path output link of the routing direction of the first connection dimension of the current routing node is routed; wherein the routing direction of the first connection dimension is a routing direction having the same sign as the routing indication coordinates of the first connection dimension.
[0147] In the routing method based on the Torus network structure provided in the embodiment of the present application, the sum of the absolute values of the routing indication coordinates corresponding to the connection dimension in the routing indication coordinates is greater than 1, indicating that multiple steps of routing are required to reach the target routing node from the current routing node, and the coordinate difference corresponding to the first connection dimension is greater than 0, indicating that routing is required in the direction of the first connection dimension. At this time, the first route in the dual-path output link in the routing direction of the first connection dimension from the current routing node limits the data of the first route in the dual-path output link, reduces the amount of data from the first route in the dual-path output link, thereby reducing link congestion when the routing node performs routing, thereby avoiding deadlock.
[0148] Step S2052, when the sum of the absolute values of the routing indication coordinates of the corresponding connection dimension in the routing indication coordinates is greater than 1, and there is a second connection dimension whose coordinate difference of the corresponding connection dimension is less than 0, a second route in the dual-path output link of the routing direction of the second connection dimension of the current routing node is routed; wherein the routing direction of the second connection dimension is a routing direction having the same sign as the routing indication coordinates of the second connection dimension.
[0149] In the routing method based on the Torus network structure provided in the embodiment of the present application, the sum of the absolute values of the routing indication coordinates corresponding to the connection dimension in the routing indication coordinates is greater than 1, indicating that multiple steps of routing are required to reach the target routing node from the current routing node, and the coordinate difference corresponding to the second connection dimension is less than 0, indicating that routing is required in the direction of the second connection dimension. At this time, the second route in the dual-path output link in the routing direction of the second connection dimension from the current routing node limits the data of the second route in the dual-path output link, reduces the amount of data from the second route in the dual-path output link, thereby reducing link congestion when the routing node performs routing, thereby avoiding deadlock.
[0150] Step S2053, when the sum of the absolute values of the routing indication coordinates corresponding to the connection dimension in the routing indication coordinates is 1, route from any one of the dual output links indicating the routing direction of the current routing node, wherein the indicated routing direction is a routing direction having the same sign as the routing indication coordinates corresponding to the connection dimension whose absolute value is 1.
[0151] The routing method based on the Torus network structure provided in the embodiment of the present application indicates that when the sum of the absolute values of the routing indication coordinates of the corresponding connection dimension in the routing indication coordinates is 1, it indicates that the current routing node is directly connected to the target routing node. At this time, the indicated routing direction is the routing direction with the same sign as the routing indication coordinates of the corresponding connection dimension whose absolute value is 1, and can be routed from any of the two output links of the indicated routing direction of the current routing node. Considering that short-distance routing is faster, the type of data transmitted from each output link is not limited on the basis of reducing the amount of data transmitted on each output link, thereby improving the efficiency of data transmission, reducing link congestion, and avoiding deadlock.
[0152] In some specific implementations of the above-mentioned step S2053, the above-mentioned step S2053 may also include: when the sum of the absolute value of the routing indication coordinate corresponding to the first connection dimension and the absolute value of the routing indication coordinate corresponding to the second connection dimension in the routing indication coordinate is 1, routing from any one of the dual output links indicating the routing direction of the current routing node, wherein the indicated routing direction is a routing direction having the same sign as the routing indication coordinate of the corresponding connection dimension whose absolute value is 1.
[0153] The routing method based on the Torus network structure provided in the embodiment of the present application is for the case of a two-dimensional Torus network structure. For the case where the corresponding connection dimensions are the X-axis connection dimension corresponding to the first connection dimension and the Y-axis connection dimension corresponding to the second connection dimension, a method is provided for routing from any one of the two-way output links indicating the routing direction of the current routing node when the sum of the absolute values of the routing indication coordinates corresponding to the two connection dimensions is 1, that is, when the current routing node is directly connected to the target routing node in the X-axis connection dimension or the Y-axis connection dimension. The indicated routing direction here is the routing direction with the same sign as the routing indication coordinate of the corresponding connection dimension with an absolute value of 1. Considering that the two routing nodes are directly connected, the routing speed for short-distance transmission is faster. Therefore, on the basis of reducing the amount of data transmitted in each output link, the type of data transmitted from each output link is not limited, thereby improving the efficiency of data transmission, reducing link congestion, and avoiding deadlock.
[0154] In a specific example scenario of the above-mentioned embodiment of the routing method based on the Torus network structure, the Torus network structure is as follows: Figure 2b The two-dimensional 5×5 network structure shown in the figure is as follows: How to avoid deadlock during routing using the routing method based on the Torus network structure in the embodiment of the present application.
[0155] Specifically, after adopting the routing method based on the Torus network structure in the above embodiment of the present application, the situation in which deadlock can be avoided is described as follows:
[0156] 1. If there is only a routing request in the X-axis direction, that is , , then the routing path only involves the path in the X-axis direction. According to the above steps S2051 and S2052, there is only the first route (0->0) of the dual output link in the routing direction, or there is only the second route (1->1) of the dual output link in the routing direction, and it is impossible to form a closed-loop deadlock.
[0157] 2. If there is only a routing request in the Y-axis direction, that is , , then the routing path only involves the path in the Y-axis direction. According to the above steps S2051 and S2052, there is only the first route (0->0) routing in the dual-path output link in the routing direction, or there is only the second route (1->1) routing in the dual-path output link in the routing direction, and it is impossible to form a closed-loop deadlock.
[0158] 3. For routing requests with both X-axis and Y-axis, that is, , , executing the traditional XY routing, the XY routing algorithm only has the turning from X to Y direction, and there is no turning from Y to X direction, so it is impossible to produce closed-loop deadlock. Therefore, the routing algorithm proposed by the present invention can avoid deadlock.
[0159] In this embodiment, a Torus network structure is provided, which includes multiple routing nodes; the routing nodes are set with dual output links to connect with adjacent routing nodes; the information to be transmitted of the current routing node is obtained; the information to be transmitted is parsed to obtain the corresponding target routing node; based on the node graph corresponding to the Torus network structure, the coordinate difference between the target routing node and the current routing node is determined, wherein the node graph is used to characterize the connection relationship between the routing nodes in the Torus network structure; based on the coordinate difference, the routing information is determined from the dual output link of the current routing node.
[0160] In some implementations of the above-mentioned Torus network structure, when performing routing, the Torus network structure determines the routing indication coordinates based on the coordinate difference and the crossing threshold of the corresponding connection dimension in the coordinate difference; based on the routing indication coordinates, the routing information is determined from the dual-path output links of the current routing node.
[0161] In some embodiments of the above-mentioned Torus network structure, when the Torus network structure performs routing, when the sum of the absolute values of the routing indication coordinates of the corresponding connection dimension in the routing indication coordinates is greater than 1, and there is a first connection dimension in which the coordinate difference of the corresponding connection dimension is greater than 0, the first route in the dual output links of the routing direction of the first connection dimension of the current routing node is taken; wherein the routing direction of the first connection dimension is a routing direction having the same sign as the routing indication coordinates of the first connection dimension.
[0162] In some embodiments of the above-mentioned Torus network structure, when the Torus network structure performs routing, when the sum of the absolute values of the routing indication coordinates of the corresponding connection dimension in the routing indication coordinates is greater than 1, and there is a second connection dimension whose coordinate difference of the corresponding connection dimension is less than 0, the second route in the dual output link of the routing direction of the second connection dimension of the current routing node is used; wherein the routing direction of the second connection dimension is a routing direction having the same sign as the routing indication coordinates of the second connection dimension.
[0163] In some embodiments of the above-mentioned Torus network structure, when the Torus network structure performs routing, when the sum of the absolute values of the routing indication coordinates of the corresponding connection dimension in the routing indication coordinates is 1, the routing is performed from any one of the dual output links indicating the routing direction of the current routing node, wherein the indicated routing direction is a routing direction having the same sign as the routing indication coordinates of the corresponding connection dimension whose absolute value is 1.
[0164] In some embodiments of the above-mentioned Torus network structure, when the Torus network structure performs routing, when the sum of the absolute value of the routing indication coordinate corresponding to the first connection dimension and the absolute value of the routing indication coordinate corresponding to the second connection dimension in the routing indication coordinate is 1, routing is performed from any one of the dual output links indicating the routing direction of the current routing node, wherein the indicated routing direction is a routing direction having the same sign as the routing indication coordinate of the corresponding connection dimension whose absolute value is 1.
[0165] In some implementations of the above-mentioned Torus network structure, when the Torus network structure performs routing, when the absolute value of the coordinate difference of the corresponding connection dimension in the coordinate difference is greater than or equal to the crossing threshold of the corresponding connection dimension, the product of the sign of the coordinate difference of the corresponding connection dimension and the number of jump steps is taken as the routing indication coordinate of the corresponding connection dimension;
[0166] Among them, the crossing threshold of the corresponding connection dimension is obtained by rounding up half of the number of nodes of the corresponding connection dimension in the node graph; the number of jump steps is the number of nodes of the corresponding connection dimension in the node graph minus the absolute value of the corresponding difference.
[0167] In some implementations of the above-mentioned Torus network structure, when the Torus network structure performs routing, when the absolute value of the coordinate difference of the corresponding connection dimension in the coordinate difference is less than the crossing threshold of the corresponding connection dimension, the coordinate difference of the corresponding connection dimension is used as the routing indication coordinate of the corresponding connection dimension.
[0168] It should be understood that the functional description of the above-mentioned Torus network structure is the same as the above-mentioned corresponding embodiment of the routing method based on the Torus network structure, and will not be repeated here.
[0169] In this embodiment, a routing device based on the Torus network structure is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "unit" can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0170] This embodiment provides a routing device based on the Torus network structure, such as Figure 4 As shown, including:
[0171] The information acquisition unit 301 is used to acquire the information to be transmitted of the current routing node;
[0172] The information parsing unit 302 is used to parse the information to be transmitted and obtain the corresponding target routing node;
[0173] A difference determination unit 303 is used to determine the coordinate difference between the target routing node and the current routing node based on the node graph corresponding to the Torus network structure; wherein the node graph is used to characterize the connection relationship between routing nodes in the Torus network structure, and the routing node is connected to the adjacent routing node through a dual-path output link;
[0174] The route determination unit 304 is used to determine the route information from the dual output links of the current route node based on the coordinate difference.
[0175] The routing device based on the Torus network structure in this embodiment is presented in the form of a routing node. The further functional description of each of the above units is the same as that of the above embodiment of the routing method based on the Torus network structure, and will not be repeated here.
[0176] The embodiment of the present invention also provides an electronic device having the above Figure 4 The routing device shown is based on the Torus network structure.
[0177] See also Figure 5 , Figure 5 is a schematic diagram of the structure of an electronic device provided by an optional embodiment of the present invention, such as Figure 5 As shown, the electronic device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 5 A processor 10 is taken as an example.
[0178] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0179] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.
[0180] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the use of an electronic device based on the presentation of a small program landing page, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0181] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0182] The electronic device further includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Figure 5 The example of connecting through bus is taken in the following.
[0183] The input device 30 can receive input data words or character information, and generate key signal input related to the user settings and function control of the electronic device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device can be a touch screen.
[0184] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0185] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A routing method based on Torus network structure, characterized in that: The method comprises: Get the information to be transmitted of the current routing node; Parsing the information to be transmitted to obtain a corresponding target routing node; Based on a node graph corresponding to the Torus network structure, determining the coordinate difference between the target routing node and the current routing node; wherein the node graph is used to characterize the connection relationship between routing nodes in the Torus network structure, and the routing node is connected to an adjacent routing node via a dual-path output link; Determining routing indication coordinates based on the coordinate difference and a crossing threshold of a corresponding connection dimension in the coordinate difference; Based on the routing indication coordinates, determining routing information from the dual-path output links of the current routing node, including: when the sum of the absolute values of the routing indication coordinates of the corresponding connection dimensions in the routing indication coordinates is greater than 1, and there is a first connection dimension in which the coordinate difference of the corresponding connection dimension is greater than 0, a first route is determined from the dual-path output links of the routing direction of the first connection dimension of the current routing node; wherein the routing direction of the first connection dimension is a routing direction having the same sign as the routing indication coordinates of the first connection dimension.
2. The method according to claim 1, characterized in that: The determining of routing information from the dual-path output links of the current routing node based on the routing indication coordinates includes: When the sum of the absolute values of the routing indication coordinates of the corresponding connection dimension in the routing indication coordinates is greater than 1, and there is a second connection dimension whose coordinate difference of the corresponding connection dimension is less than 0, a second route in the dual-path output link of the routing direction of the second connection dimension of the current routing node is selected; wherein the routing direction of the second connection dimension is a routing direction having the same sign as the routing indication coordinate of the second connection dimension.
3. The method according to claim 1, characterized in that The determining of routing information from the dual-path output links of the current routing node based on the routing indication coordinates includes: When the sum of the absolute values of the routing indication coordinates of the corresponding connection dimension in the routing indication coordinates is 1, a route is taken from any one of the dual output links of the current routing node indicating a routing direction, wherein the indicated routing direction is a routing direction having the same sign as the routing indication coordinates of the corresponding connection dimension whose absolute value is 1.
4. The method according to claim 3, characterized in that When the sum of the absolute values of the routing indication coordinates corresponding to the connection dimension in the routing indication coordinates is 1, routing from any one of the two-way output links indicating the routing direction of the current routing node, wherein the indicated routing direction is a routing direction having the same sign as the routing indication coordinates corresponding to the connection dimension whose absolute value is 1, including: When the sum of the absolute value of the routing indication coordinate corresponding to the first connection dimension and the absolute value of the routing indication coordinate corresponding to the second connection dimension in the routing indication coordinate is 1, a route is taken from any one of the dual output links indicating a routing direction of the current routing node, wherein the indicated routing direction is a routing direction having the same sign as the routing indication coordinate of the corresponding connection dimension whose absolute value is 1.
5. The method according to claim 1, characterized in that The determining the routing indication coordinates based on the coordinate difference and the crossing threshold of the corresponding connection dimension in the coordinate difference includes: When the absolute value of the coordinate difference of the corresponding connection dimension in the coordinate difference is greater than or equal to the crossing threshold of the corresponding connection dimension, the product of the sign of the coordinate difference of the corresponding connection dimension and the number of jump steps is taken as the routing indication coordinate of the corresponding connection dimension; Among them, the crossing threshold of the corresponding connection dimension is obtained by rounding up half of the number of nodes of the corresponding connection dimension in the node graph; the number of jump steps is the number of nodes of the corresponding connection dimension in the node graph minus the absolute value of the corresponding difference.
6. The method according to claim 5, characterized in that When the absolute value of the coordinate difference of the corresponding connection dimension in the coordinate difference is greater than or equal to the crossing threshold of the corresponding connection dimension, the product of the sign of the coordinate difference of the corresponding connection dimension and the jump step number is taken as the routing indication coordinate of the corresponding connection dimension, including: in, It is the routing coordinate corresponding to the X-axis connection dimension in the routing coordinate. is the routing indication coordinate corresponding to the Y-axis connection dimension in the routing indication coordinate; is the coordinate difference corresponding to the X-axis connection dimension in the coordinate difference, is the coordinate difference corresponding to the Y-axis connection dimension in the coordinate difference, is the absolute value of the coordinate difference corresponding to the X-axis connection dimension in the coordinate difference, is the absolute value of the coordinate difference corresponding to the Y-axis connection dimension in the coordinate difference, is the number of routing nodes corresponding to the X-axis and Y-axis connection dimensions in the node graph, It is the crossing threshold corresponding to the connection dimension of X-axis and Y-axis. The coordinate difference of the corresponding X-axis connection dimension is greater than or equal to the crossing threshold of the corresponding X-axis connection dimension. The coordinate difference of the corresponding Y-axis connection dimension is greater than or equal to the crossing threshold of the corresponding Y-axis connection dimension. is the sign of the coordinate difference corresponding to the X-axis connection dimension, is the sign of the coordinate difference corresponding to the Y-axis connection dimension, is the number of jump steps corresponding to the X-axis connection dimension, is the number of jump steps corresponding to the Y-axis connection dimension, It is the product of the sign of the coordinate difference corresponding to the X-axis connection dimension and the number of jump steps. It is the product of the sign of the coordinate difference corresponding to the Y-axis connection dimension and the number of jump steps.
7. The method according to claim 1, characterized in that The determining the routing indication coordinates based on the coordinate difference and the crossing threshold of the corresponding connection dimension in the coordinate difference includes: When the absolute value of the coordinate difference corresponding to the connection dimension in the coordinate differences is less than the crossing threshold of the corresponding connection dimension, the coordinate difference corresponding to the connection dimension is used as the routing indication coordinate of the corresponding connection dimension.
8. The method according to claim 7, characterized in that When the absolute value of the coordinate difference of the corresponding connection dimension in the coordinate difference is less than the crossing threshold of the corresponding connection dimension, using the coordinate difference of the corresponding connection dimension as the routing indication coordinate of the corresponding connection dimension includes: in, It is the routing coordinate corresponding to the X-axis connection dimension in the routing coordinate. is the routing indication coordinate corresponding to the Y-axis connection dimension in the routing indication coordinate; is the coordinate difference corresponding to the X-axis connection dimension in the coordinate difference, is the coordinate difference corresponding to the Y-axis connection dimension in the coordinate difference, is the absolute value of the coordinate difference corresponding to the X-axis connection dimension in the coordinate difference, is the absolute value of the coordinate difference corresponding to the Y-axis connection dimension in the coordinate difference, is the number of routing nodes corresponding to the X and Y axis connection dimensions in the node graph, It is the crossing threshold corresponding to the connection dimension of X and Y axes.
9. A Torus network structure, characterized in that: The Torus network structure includes multiple routing nodes; the routing nodes are provided with dual-path output links to connect with adjacent routing nodes; when the Torus network structure performs routing, Get the information to be transmitted of the current routing node; Parsing the information to be transmitted to obtain a corresponding target routing node; Determining the coordinate difference between the target routing node and the current routing node based on a node graph corresponding to the Torus network structure, wherein the node graph is used to characterize the connection relationship between routing nodes in the Torus network structure; Determining routing indication coordinates based on the coordinate difference and a crossing threshold of a corresponding connection dimension in the coordinate difference; Based on the routing indication coordinates, determining routing information from the dual-path output links of the current routing node, including: when the sum of the absolute values of the routing indication coordinates of the corresponding connection dimensions in the routing indication coordinates is greater than 1, and there is a first connection dimension in which the coordinate difference of the corresponding connection dimension is greater than 0, a first route is determined from the dual-path output links of the routing direction of the first connection dimension of the current routing node; wherein the routing direction of the first connection dimension is a routing direction having the same sign as the routing indication coordinates of the first connection dimension.
10. The Torus network structure according to claim 9, characterized in that: When the Torus network structure performs routing, the determining of routing information from the dual-path output links of the current routing node based on the routing indication coordinates includes: When the sum of the absolute values of the routing indication coordinates of the corresponding connection dimension in the routing indication coordinates is greater than 1, and there is a second connection dimension whose coordinate difference of the corresponding connection dimension is less than 0, a second route in the dual-path output link of the routing direction of the second connection dimension of the current routing node is selected; wherein the routing direction of the second connection dimension is a routing direction having the same sign as the routing indication coordinate of the second connection dimension.
11. The Torus network structure according to claim 9, characterized in that: When the Torus network structure performs routing, the determining of routing information from the dual-path output links of the current routing node based on the routing indication coordinates includes: When the sum of the absolute values of the routing indication coordinates of the corresponding connection dimension in the routing indication coordinates is 1, a route is taken from any one of the dual output links of the current routing node indicating a routing direction, wherein the indicated routing direction is a routing direction having the same sign as the routing indication coordinates of the corresponding connection dimension whose absolute value is 1.
12. The Torus network structure according to claim 11, characterized in that: When the Torus network structure performs routing, when the sum of the absolute values of the routing indication coordinates corresponding to the connection dimension in the routing indication coordinates is 1, routing is performed from any one of the two-way output links indicating the routing direction of the current routing node, wherein the indicated routing direction is a routing direction having the same sign as the routing indication coordinates corresponding to the connection dimension whose absolute value is 1, including: When the sum of the absolute value of the routing indication coordinate corresponding to the first connection dimension and the absolute value of the routing indication coordinate corresponding to the second connection dimension in the routing indication coordinate is 1, a route is taken from any one of the dual output links indicating a routing direction of the current routing node, wherein the indicated routing direction is a routing direction having the same sign as the routing indication coordinate of the corresponding connection dimension whose absolute value is 1.
13. The Torus network structure according to claim 9, characterized in that: When the Torus network structure performs routing, the determining of the routing indication coordinates based on the coordinate difference and the crossing threshold of the corresponding connection dimension in the coordinate difference includes: When the absolute value of the coordinate difference of the corresponding connection dimension in the coordinate difference is greater than or equal to the crossing threshold of the corresponding connection dimension, the product of the sign of the coordinate difference of the corresponding connection dimension and the number of jump steps is taken as the routing indication coordinate of the corresponding connection dimension; Among them, the crossing threshold of the corresponding connection dimension is obtained by rounding up half of the number of nodes of the corresponding connection dimension in the node graph; the number of jump steps is the number of nodes of the corresponding connection dimension in the node graph minus the absolute value of the corresponding difference.
14. The Torus network structure according to claim 9, characterized in that: When the Torus network structure performs routing, the determining of the routing indication coordinates based on the coordinate difference and the crossing threshold of the corresponding connection dimension in the coordinate difference includes: When the absolute value of the coordinate difference corresponding to the connection dimension in the coordinate differences is less than the crossing threshold of the corresponding connection dimension, the coordinate difference corresponding to the connection dimension is used as the routing indication coordinate of the corresponding connection dimension.
15. A routing device based on a Torus network structure, characterized in that: The device comprises: An information acquisition unit, used to acquire the information to be transmitted of the current routing node; An information parsing unit, used to parse the information to be transmitted and obtain a corresponding target routing node; a difference determination unit, configured to determine the coordinate difference between the target routing node and the current routing node based on a node graph corresponding to a Torus network structure; wherein the node graph is used to characterize the connection relationship between routing nodes in the Torus network structure, and the routing node is connected to an adjacent routing node via a dual-path output link; A routing determination unit is used to determine the routing indication coordinates based on the coordinate difference and the crossing threshold of the corresponding connection dimension in the coordinate difference; based on the routing indication coordinates, determine the routing information from the dual-path output link of the current routing node, including: when the sum of the absolute values of the routing indication coordinates of the corresponding connection dimension in the routing indication coordinates is greater than 1, and there is a first connection dimension whose coordinate difference of the corresponding connection dimension is greater than 0, a first route in the dual-path output link of the routing direction of the first connection dimension of the current routing node; wherein the routing direction of the first connection dimension is a routing direction having the same sign as the routing indication coordinates of the first connection dimension.
16. A computer device, characterized in that: The computer device comprises: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the routing method according to any one of claims 1 to 8 by executing the computer instructions.
17. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the routing method according to any one of claims 1 to 8.
