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 obtaining and parsing routing information in the Torus network structure, and using dual output links to determine routing when routing nodes, the deadlock problem is solved and the transmission efficiency and throughput of the network are improved.
Patent Information
- Application Number
- CN202410926244.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-11
- Publication Date
- 2024-09-17
- 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 of the current routing node, parsing the source routing node and the target routing node, the node graph based on the Torus network structure determines the coordinate difference between the target routing node and the current routing node, and when the current routing node is an edge routing node , determine routing information from the dual output links of edge routing nodes, achieve data decomposition and smooth transmission, and avoid deadlocks.
It reduces the occurrence rate of deadlock, improves the throughput of data on the surround link, and optimizes the routing performance of the Torus network structure.
Smart Images

Figure CN118474017B
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 connections corresponding to the head and tail nodes of the X-axis connection relationship and the head and tail nodes of the Y-axis connection relationship, the "closed loop" phenomenon in the routing transmission is increased. If the traditional routing algorithm is used, when the surrounding link connection is blocked due to the transmission link or node, it is easy to cause deadlock. 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 source routing node and target routing node;
[0011] 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, and the edge routing nodes in the node graph are connected to the corresponding edge routing nodes in the node graph through dual-path output links;
[0012] When the current routing node is an edge routing node and the route determined based on the coordinate difference crosses the edge routing node, the routing information is determined from the dual-path output links of the edge routing node according to the source 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 source routing node and the target routing node, and the accuracy of the source routing node and 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 routing 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 edge routing nodes in the node graph are connected to the corresponding edge routing nodes in the node graph through dual-path output links, which increases the number of physical transmission links of the edge routing nodes when routing across domain edge routing nodes, and provides a physical link basis for reducing deadlock. When the current routing node is an edge routing node and the route determined based on the coordinate difference crosses the edge routing node, the routing information is determined from the dual output links of the edge routing node according to the source routing node, so that the output link of the edge routing node when crossing the edge routing node route is determined according to the source routing node, thereby decomposing the data that the edge routing node needs to transmit when passing through the surrounding link, reducing the amount of data that needs to be processed by each output link, and improving the smoothness of the data transmitted by the edge routing node when passing through the surrounding link without blocking, avoiding the deadlock phenomenon caused by the surrounding link connection, thereby reducing the delay in data transmission, improving the data throughput of the edge routing node on the surrounding link, and optimizing the routing performance of the Torus network structure.
[0014] In an optional implementation, when the current routing node is an edge routing node and the route determined based on the coordinate difference crosses the edge routing node, determining routing information from a dual-path output link of the edge routing node according to the source routing node includes:
[0015] When the current routing node is an edge routing node and the route determined based on the first routing indication coordinates crosses the edge routing node, determining routing information from a dual-path output link of the edge routing node according to the source routing node;
[0016] The first route indication coordinates are determined based on the coordinate difference and a crossing threshold of a corresponding connection dimension in the coordinate difference.
[0017] The routing method based on the Torus network structure provided in the embodiment of the present application ensures the accuracy of the crossing edge routing node indicated by the determined first routing indication coordinates, because the first routing indication coordinates are determined based on the comparison result between the coordinate difference and the crossing threshold of the corresponding connection dimension in the coordinate difference. Therefore, when the current routing node is an edge routing node and the route determined based on the first routing indication coordinates crosses the edge routing node, when the routing information is determined from the dual-path output link of the edge routing node according to the source routing node, the accuracy of the routing conditions required to be judged is ensured, thereby improving the accuracy of the routing information determined from the dual-path output link of the edge routing node according to the source routing node.
[0018] In an optional implementation, the first route indication coordinate is determined based on the coordinate difference and a crossing threshold of a corresponding connection dimension in the coordinate difference, including:
[0019] 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 first routing indication coordinate of the corresponding connection dimension; 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;
[0020] The jump step number is the number of routing nodes of the corresponding connection dimension in the node graph minus the absolute value of the corresponding difference, the sign of the first routing indication coordinate indicates the direction of the routing, and the value of the first routing indication coordinate indicates the number of routing steps.
[0021] The routing method based on the Torus network structure provided in the embodiment of the present application defines the generation condition of the first routing indication coordinate 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, thereby ensuring the accuracy of the determined first routing indication coordinate. 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, thereby ensuring the rationality and accuracy of the crossing threshold determined in the generation condition of the first routing indication coordinate. The product of the sign of the coordinate difference of the corresponding connection dimension and the number of jump steps after the sign is reversed is used as the first 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, the sign of the first routing indication coordinate indicates the direction of the routing, and the value of the first routing indication coordinate indicates the number of steps of the routing. Here, the direction of the routing indicated by the first routing indication coordinate is reverse routing, and the number of steps of the routing is actually the number of routing nodes of the corresponding connection dimension minus the absolute value of the corresponding difference, thereby achieving the shortest path from the edge routing node to the target routing node, thereby ensuring the rationality and accuracy of the determined first routing indication coordinate.
[0022] In an optional implementation, the first route indication coordinate is determined based on the coordinate difference and a crossing threshold of a corresponding connection dimension in the coordinate difference, including:
[0023]
[0024]
[0025] in, is the routing indication coordinate corresponding to the X-axis connection dimension in the first routing indication coordinate, is the routing indication coordinate corresponding to the Y-axis connection dimension in the first 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.
[0026] The routing method based on the Torus network structure provided in the embodiment of the present application provides generation conditions and formulas for the first routing indication coordinates for the case of a two-dimensional Torus network structure, for the case where the corresponding connection dimensions are the X-axis connection dimension and the Y-axis connection dimension, respectively. The direction of the route and the number of steps of the route indicated by the first 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 first routing indication coordinates.
[0027] In an optional implementation, when the current routing node is an edge routing node and the route determined based on the first routing indication coordinates crosses the edge routing node, determining routing information from a dual-path output link of the edge routing node according to the source routing node includes:
[0028] When the current routing node is an edge routing node and the route determined based on the first routing indication coordinate crosses the edge routing node, if the source routing node is an edge routing node, a first route in the dual-path output link in the direction of the route indicated by the sign of the first routing indication coordinate is output.
[0029] The routing method based on the Torus network structure provided in the embodiment of the present application, when the current routing node is an edge routing node and the route determined based on the first routing indication coordinate crosses the edge routing node, if the source routing node is an edge routing node, the first route in the dual-path output link in the direction of the route indicated by the symbol of the first routing indication coordinate is limited, and the amount of data from the first route in the dual-path output link is reduced, thereby reducing link congestion when routing across edge routing nodes, thereby avoiding deadlock.
[0030] In an optional implementation, when the current routing node is an edge routing node and the route determined based on the first routing indication coordinates crosses the edge routing node, determining routing information from a dual-path output link of the edge routing node according to the source routing node includes:
[0031] When the current routing node is an edge routing node and the route determined based on the first routing indication coordinate crosses the edge routing node, if the source routing node is not an edge routing node, the second route in the dual-path output link in the direction of the route indicated by the sign of the first routing indication coordinate is routed.
[0032] The routing method based on the Torus network structure provided in the embodiment of the present application, when the current routing node is an edge routing node and the route determined based on the first routing indication coordinate crosses the edge routing node, if the source routing node is not an edge routing node, the second route in the dual-path output link in the direction of the route indicated by the symbol of the first routing indication coordinate is limited, and the data from the second route in the dual-path output link is reduced, thereby reducing the amount of data from the second route in the dual-path output link, thereby reducing link congestion when routing across edge routing nodes, thereby avoiding deadlock.
[0033] In an optional embodiment, the method further includes:
[0034] When the current routing node is an edge routing node and the route determined based on the coordinate difference does not cross the edge routing node, the route is from the single output link of the edge routing node; wherein the edge routing node in the node graph is connected to the adjacent routing nodes in the node graph except the relative edge routing node through the single output link.
[0035] The routing method based on the Torus network structure provided in the embodiment of the present application is to route from the single-path output link of the edge routing node when the current routing node is an edge routing node and the route determined based on the coordinate difference does not cross the edge routing node; wherein the edge routing node in the node graph is connected to the adjacent routing nodes in the node graph other than the relative edge routing node through the single-path output link. When the edge routing node does not need to pass through the surrounding link connecting the head and tail routing nodes of the corresponding connection dimension, the routing from the single-path output link of the edge routing node is limited to the adjacent nodes other than the relative edge routing node, thereby ensuring the accuracy of the routing link output from the edge routing node to the above-mentioned adjacent routing node. Together with the above-mentioned determination of routing information from the dual-path output link of the edge routing node, the smoothness and traffic efficiency of the overall routing in the Torus network structure are taken into account, and the routing performance of the Torus network structure is improved.
[0036] In an optional implementation, when the current routing node is an edge routing node and the route determined based on the coordinate difference does not cross the edge routing node, routing from a single output link of the edge routing node includes:
[0037] When the current routing node is an edge routing node and the route determined based on the second routing indication coordinates does not cross the edge routing node, routing from a single output link of the edge routing node;
[0038] The second route indication coordinates are determined based on the coordinate difference and a crossing threshold of a corresponding connection dimension in the coordinate difference.
[0039] The routing method based on the Torus network structure provided in the embodiment of the present application, since the second 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, the accuracy of the non-crossing edge routing nodes indicated by the second routing indication coordinates is guaranteed. Therefore, when the current routing node is an edge routing node, and the route determined based on the second routing indication coordinates does not cross the edge routing node, the single-path output link routing from the edge routing node ensures the accuracy of the determined routing information. Furthermore, the above-mentioned single-path output link routing from the edge routing node, together with the above-mentioned determination of routing information from the dual-path output link of the edge routing node, takes into account the overall routing smoothness and routing efficiency in the Torus network structure, and improves the routing performance of the Torus network structure.
[0040] In an optional implementation, the second route indication coordinates are determined based on the coordinate difference and a crossing threshold of a corresponding connection dimension in the coordinate difference, including:
[0041] 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 second routing indication coordinate of the corresponding connection dimension;
[0042] The sign of the second route indication coordinate indicates the direction of the route, and the value of the second route indication coordinate indicates the number of steps of the route.
[0043] The routing method based on the Torus network structure provided in the embodiment of the present application defines the generation conditions of the second 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 second routing indication coordinates. The coordinate difference of the corresponding connection dimension is used as the second routing indication coordinate of the corresponding connection dimension, wherein the sign of the second routing indication coordinate indicates the direction of the routing, and the value of the second 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 second routing indication coordinate and the number of steps of the routing indicated by the value of the second 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 second routing indication coordinates.
[0044] In an optional implementation, the second route indication coordinates are determined based on the coordinate difference and a crossing threshold of a corresponding connection dimension in the coordinate difference, including:
[0045]
[0046]
[0047] in, is the routing indication coordinate corresponding to the X-axis connection dimension in the second routing indication coordinate, is the routing indication coordinate corresponding to the Y-axis connection dimension in the second 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.
[0048] The routing method based on the Torus network structure provided in the embodiment of the present application provides generation conditions and formulas for the second routing indication coordinates for the case of a two-dimensional Torus network structure, for the case where the corresponding connection dimensions are the X-axis connection dimension and the Y-axis connection dimension, respectively. The direction of the route and the number of steps of the route determined based on the second 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 second routing indication coordinates.
[0049] In a second aspect, the present invention provides a Torus network structure, wherein the Torus network structure includes a plurality of routing nodes; an edge routing node in the routing node is connected to a corresponding edge routing node in the Torus network structure via a dual-path output link;
[0050] When the Torus network structure is routing, it obtains the information to be transmitted of the current routing node;
[0051] Parse the information to be transmitted and obtain the corresponding source routing node and target routing node;
[0052] 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, and the edge routing nodes in the node graph are connected to the corresponding edge routing nodes in the node graph through dual-path output links;
[0053] When the current routing node is an edge routing node and the route determined based on the coordinate difference crosses the edge routing node, the routing information is determined from the dual-path output links of the edge routing node according to the source routing node.
[0054] The Torus network structure provided in the embodiment of the present application includes multiple routing nodes in the Torus network structure; the edge routing nodes in the routing nodes are connected to the corresponding edge routing nodes in the Torus network structure through dual-path output links, which increases the number of physical transmission links of the edge routing nodes when routing across domain edge routing nodes, and provides a physical link basis to avoid deadlock due to blocking of surrounding links. When routing, the Torus network structure obtains the information to be transmitted of the current routing node, ensuring the accuracy of the data transmitted by the determined routing information. The information to be transmitted is parsed to obtain the corresponding source routing node and the target routing node, ensuring the accuracy of the source routing node and 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, ensuring the accuracy of the routing direction and the number of routing steps of the determined routing information. When the current routing node is an edge routing node and the route determined based on the coordinate difference crosses the edge routing node, the routing information is determined from the dual output links of the edge routing node according to the source routing node, so that the output link of the edge routing node when crossing the edge routing node route is determined according to the source routing node, thereby decomposing the data that the edge routing node needs to transmit when passing through the surrounding link, reducing the amount of data that needs to be processed by each output link, and improving the smoothness of the data transmitted by the edge routing node when passing through the surrounding link without blocking, avoiding the deadlock phenomenon caused by the surrounding link connection, thereby reducing the delay in data transmission, improving the data throughput of the edge routing node on the surrounding link, and optimizing the routing performance of the Torus network structure.
[0055] In an optional implementation, when the Torus network structure performs routing, when the current routing node is an edge routing node and the route determined based on the first routing indication coordinate crosses the edge routing node, the routing information is determined from the dual-path output link of the edge routing node according to the source routing node;
[0056] The first route indication coordinates are determined based on the coordinate difference and a crossing threshold of a corresponding connection dimension in the coordinate difference.
[0057] The Torus network structure provided in the embodiment of the present application, when the Torus network structure performs routing, the first routing indication coordinate is determined based on the comparison result between the coordinate difference and the crossing threshold of the corresponding connection dimension in the coordinate difference, thereby ensuring the accuracy of the crossing edge routing node indicated by the determined first routing indication coordinate. Therefore, when the current routing node is an edge routing node and the route determined based on the first routing indication coordinate crosses the edge routing node, when the routing information is determined from the dual-path output link of the edge routing node according to the source routing node, the accuracy of the routing conditions required to be judged is ensured, thereby improving the accuracy of the routing information determined from the dual-path output link of the edge routing node according to the source routing node.
[0058] 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 inverted as the first routing indication coordinate of the corresponding connection dimension;
[0059] The jump step number is the number of routing nodes of the corresponding connection dimension in the node graph minus the absolute value of the corresponding difference, the sign of the first routing indication coordinate indicates the direction of the routing, and the value of the first routing indication coordinate indicates the number of routing steps.
[0060] The Torus network structure provided in the embodiment of the present application defines the generation conditions of the first routing indication coordinates 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 during routing, thereby ensuring the accuracy of the determined first 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, thereby ensuring the rationality and accuracy of the crossing threshold determined in the generation conditions of the first 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 first 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. The sign of the first routing indication coordinate indicates the direction of routing, and the value of the first routing indication coordinate indicates the number of steps of routing. Here, the direction of the route indicated by the first routing indication coordinate is reverse routing. 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, which realizes the shortest path from the edge routing node to the target routing node, thereby ensuring the rationality and accuracy of the determined first routing indication coordinate.
[0061] In an optional embodiment, when the Torus network structure is performing routing, when the current routing node is an edge routing node and the route determined based on the first routing indication coordinate crosses the edge routing node, if the source routing node is an edge routing node, the first route in the dual-path output link in the direction of the route indicated by the symbol of the first routing indication coordinate is selected.
[0062] The Torus network structure provided in the embodiment of the present application, when the Torus network structure is routing, when the current routing node is an edge routing node and the route determined based on the first routing indication coordinate crosses the edge routing node, if the source routing node is an edge routing node, the first route in the dual-path output link in the direction of the route indicated by the symbol of the first routing indication coordinate is used to limit the data from the first route in the dual-path output link, and the amount of data from the first route in the dual-path output link is reduced, thereby reducing link congestion when routing across edge routing nodes, thereby avoiding deadlock.
[0063] In an optional embodiment, when the Torus network structure is performing routing, when the current routing node is an edge routing node and the route determined based on the first routing indication coordinate crosses the edge routing node, if the source routing node is not an edge routing node, the second route in the dual-path output link in the direction of the route indicated by the symbol of the first routing indication coordinate is used.
[0064] The Torus network structure provided in the embodiment of the present application, when the current routing node is an edge routing node and the route determined based on the first routing indication coordinate crosses the edge routing node, if the source routing node is not an edge routing node, the second route in the dual-path output link in the direction of the route indicated by the symbol of the first routing indication coordinate is limited, and the amount of data routed from the second route in the dual-path output link is reduced, thereby reducing link congestion when routing across edge routing nodes, thereby avoiding deadlock.
[0065] In an optional embodiment, when the Torus network structure is performing routing, when the current routing node is an edge routing node and the route determined based on the coordinate difference does not cross the edge routing node, routing is performed from the single output link of the edge routing node; wherein the edge routing node in the node graph is connected to the adjacent routing nodes in the node graph except the relative edge routing node through the single output link.
[0066] The Torus network structure provided in the embodiment of the present application, when the Torus network structure is routing, when the current routing node is an edge routing node and the route determined based on the coordinate difference does not cross the edge routing node, the single-path output link of the edge routing node is used for routing; wherein the edge routing node in the node graph is connected to the adjacent routing nodes in the node graph except the relative edge routing node through the single-path output link. When the edge routing node does not need to pass through the surrounding link of the head and tail routing nodes of the corresponding connection dimension, the single-path output link of the edge routing node is limited to the adjacent node, thereby ensuring the accuracy of the routing link output from the edge routing node to the adjacent routing node, and together with the above-mentioned determination of routing information from the dual-path output link of the edge routing node, the smoothness and traffic efficiency of the overall routing in the Torus network structure are taken into account, and the routing performance of the Torus network structure is improved.
[0067] In an optional implementation, when the Torus network structure performs routing, when the current routing node is an edge routing node and the route determined based on the second routing indication coordinates does not cross the edge routing node, routing is performed from a single output link of the edge routing node;
[0068] The second route indication coordinates are determined based on the coordinate difference and a crossing threshold of a corresponding connection dimension in the coordinate difference.
[0069] The Torus network structure provided in the embodiment of the present application, when the Torus network structure performs routing, because the second 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, the accuracy of the second routing indication coordinates indicating that the edge routing nodes are not crossed is guaranteed. Therefore, when the current routing node is an edge routing node, and the route determined based on the second routing indication coordinates does not cross the edge routing node, the single-path output link routing from the edge routing node ensures the accuracy of the determined routing information. Furthermore, the above-mentioned single-path output link routing from the edge routing node, together with the above-mentioned determination of routing information from the dual-path output links of the edge routing node, takes into account the overall routing smoothness and routing efficiency in the Torus network structure, and improves the routing performance of the Torus network structure.
[0070] 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 second routing indication coordinate of the corresponding connection dimension;
[0071] The sign of the second route indication coordinate indicates the direction of the route, and the value of the second route indication coordinate indicates the number of steps of the route.
[0072] The Torus network structure provided in the embodiment of the present application, 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 generation condition of the second routing indication coordinate is limited, thereby ensuring the accuracy of the determined second routing indication coordinate. The coordinate difference of the corresponding connection dimension is used as the second routing indication coordinate of the corresponding connection dimension, wherein the sign of the second routing indication coordinate indicates the direction of routing, and the value of the second 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 second routing indication coordinate and the number of steps of routing indicated by the value of the second 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 second routing indication coordinate.
[0073] In a third aspect, the present invention provides a routing device based on a Torus network structure, the device comprising:
[0074] An information acquisition unit, used to acquire the information to be transmitted of the current routing node;
[0075] An information parsing unit, used to parse the information to be transmitted and obtain the corresponding source routing node and target routing node;
[0076] A difference determination unit, configured to determine a coordinate difference between a target routing node and a current routing node based on a node graph corresponding to the Torus network structure, wherein the node graph is used to characterize a connection relationship between routing nodes in the Torus network structure, and an edge routing node in the node graph is connected to a corresponding edge routing node in the node graph via a dual-path output link;
[0077] The route determination unit is used to determine the route information from the dual-path output links of the edge routing node according to the source routing node when the current routing node is an edge routing node and the route determined based on the coordinate difference crosses the edge routing node.
[0078] 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, obtain the corresponding source routing node and the target routing node, thereby ensuring the accuracy of the source routing node and 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 routing 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, and the edge routing nodes in the node graph are connected to the corresponding edge routing nodes in the node graph through dual-path output links, thereby increasing the number of physical transmission links of the edge routing nodes when routing across cross-domain edge routing nodes, thereby providing a physical link basis for reducing deadlock. The route determination unit is used to determine the route information from the dual output links of the edge routing node according to the source routing node when the current routing node is an edge routing node and the route determined based on the coordinate difference crosses the edge routing node, thereby determining the output link of the edge routing node when crossing the edge routing node route according to the source routing node, thereby decomposing the data that the edge routing node needs to transmit when passing through the surrounding link, reducing the amount of data that needs to be processed by each output link, and improving the smoothness of the data transmitted by the edge routing node when passing through the surrounding link without blocking, avoiding the deadlock phenomenon caused by the surrounding link connection, thereby reducing the delay in data transmission, improving the data throughput of the edge routing node on the surrounding link, and optimizing the routing performance of the Torus network structure.
[0079] 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.
[0080] 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
[0081] 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.
[0082] 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;
[0083] 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;
[0084] 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;
[0085] Figure 2a is a flow chart of a routing method based on a Torus network structure according to an embodiment of the present invention;
[0086] 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;
[0087] Figure 2c is a schematic diagram of an implementation scheme of a connection link between an edge routing node and an opposite edge routing node according to an embodiment of the present invention;
[0088] Figure 2d is a schematic diagram of an implementation scheme of a connection link between an edge routing node and an adjacent routing node according to an embodiment of the present invention;
[0089] Figure 3 is a flow chart of another routing method based on a Torus network structure according to an embodiment of the present invention;
[0090] Figure 4a is a schematic diagram of a deadlock-free situation in which there are cross-edge routing nodes in the counterclockwise direction of the X-axis connection dimension according to an embodiment of the present invention;
[0091] Figure 4b is a schematic diagram of a deadlock-free situation in which there are cross-edge routing nodes in the clockwise direction of the X-axis connection dimension according to an embodiment of the present invention;
[0092] Figure 4c It is a schematic diagram of a deadlock-free situation in which there are cross-edge routing nodes in the X-axis connection dimension and the Y-axis connection dimension according to an embodiment of the present invention;
[0093] Figure 4d is a schematic diagram of no deadlock in the X-axis connection dimension and the Y-axis connection dimension when there is no cross-edge routing node in the routing according to an embodiment of the present invention;
[0094] Figure 5 is a structural block diagram of a routing device based on a Torus network structure according to an embodiment of the present invention;
[0095] Figure 6 It is a schematic diagram of the hardware structure of the electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0096] 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.
[0097] 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.
[0098] 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.
[0099] In an actual Mesh network, the number of routing nodes N corresponding to each 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.
[0100] 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.
[0101] 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.
[0102] 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.
[0103] 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.
[0104] 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.
[0105] 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.
[0106] 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.
[0107] 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:
[0108] Step S101, obtaining information to be transmitted of the current routing node.
[0109] 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.
[0110] Step S102, parsing the information to be transmitted to obtain the corresponding source routing node and target routing node.
[0111] The header data of the message to be transmitted generally includes information indicating a source routing node and a target routing node.
[0112] 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. The node graph is used to characterize the connection relationship between routing nodes in the Torus network structure, and the edge routing node in the node graph is connected to the corresponding edge routing node in the node graph through a dual-path output link.
[0113] 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.
[0114] 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.
[0115] 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 edge routing nodes in the node diagram are connected to the corresponding edge routing nodes in the node diagram through bold dual-path output links. Each routing node uses coordinates to represent its position in the node diagram. Specifically, Figure 2c As shown, Figure 2c It shows that the edge routing nodes at the beginning and end of the corresponding connection dimension in the node graph are connected by dual output links (0,1 output links).
[0116] Step S104, when the current routing node is an edge routing node and the route determined based on the coordinate difference crosses the edge routing node, determine routing information from the dual-path output links of the edge routing node according to the source routing node.
[0117] Among them, edge routing nodes refer to routing nodes at the edge of the Torus network structure. In the Torus network node graph, whether the current routing node is an edge routing node can be determined by whether the coordinates of the current routing node match the coordinates of the edge routing node.
[0118] by Figure 2b Taking the two-dimensional Torus network structure in as an example, the edge routing nodes include: routing nodes (0,0) (1,0) (2,0) (3,0) (4,0) (0,1) (0,2) (0,3) (0,4) (1,4) (2,4) (3,4) (4,4) (4,1) (4,2) (4,3) located on a single edge of the network node graph, and edge routing nodes (0,0) (4,0) (0,4) (4,4) located on two edges of the network node graph. That is, when the coordinates of the current routing node meet the coordinates of the above edge routing nodes, it can be confirmed that the current routing node is an edge routing node.
[0119] 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 :
[0120]
[0121] Specifically, based on the coordinate difference, it can be determined whether the route crosses the edge routing node. The specific determination method can adopt the method for determining whether the route crosses the edge routing node in the existing technology or the technology to be developed in the future, and this application does not limit this. For example, a spanning function for determining whether the route crosses the edge routing node can be constructed, so as to determine whether the route crosses the edge routing node in the form of calling the spanning function.
[0122] In one possible manner, for the coordinate difference corresponding to the connection dimension i in the coordinate difference, when the coordinate difference corresponding to the connection dimension i is less than the distance between the edge routing node of the connection dimension i and the network center, it is determined that the routing in the corresponding connection dimension i does not cross the domain routing node, otherwise, it crosses the routing node.
[0123] When it is determined that the current routing node is an edge routing node and the route determined by the coordinate difference crosses the edge routing node, the source routing node of the information to be transmitted can be used as the basis for determining the output link during the information transmission process, and the information to be transmitted can be allocated to each output link in the dual output links.
[0124] 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 source routing node, such as information transmission efficiency, probability of congestion or output path options, and according to experience or preset rules, and the present application does not limit this.
[0125] Alternatively or additionally, Figure 2a The routing method based on the Torus network structure may further include step S105 based on the above steps S101 to S104.
[0126] Step S105: when the current routing node is an edge routing node and the route determined based on the coordinate difference does not cross the edge routing node, output the link route from the single path of the edge routing node.
[0127] Wherein, the edge routing node in the node graph is connected to the adjacent routing nodes in the node graph except the opposite edge routing node through a single output link. Figure 2b As shown in , the edge routing nodes in the node graph are connected to adjacent routing nodes in the node graph except the opposite edge routing nodes through the unbold single-path output link. Specifically, as Figure 2d As shown, Figure 2d It is shown that the edge routing nodes in the node graph are connected to the adjacent routing nodes except the opposite edge routing nodes through a single output link.
[0128] Specifically, for details of the edge routing nodes, the coordinate difference, and whether the route determined by the coordinate difference crosses the edge routing nodes, please refer to the description in the above step S104, which will not be repeated here.
[0129] 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 source routing node and the target routing node, and the accuracy of the source routing node and 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 routing 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 edge routing nodes in the node graph are connected to the corresponding edge routing nodes in the node graph through dual-path output links, which increases the number of physical transmission links of the edge routing nodes when routing across domain edge routing nodes, and provides a physical link basis for reducing deadlock. When the current routing node is an edge routing node and the route determined based on the coordinate difference crosses the edge routing node, the routing information is determined from the dual output links of the edge routing node according to the source routing node, so that the output link of the edge routing node when crossing the edge routing node route is determined according to the source routing node, thereby decomposing the data that the edge routing node needs to transmit when passing through the surrounding link, reducing the amount of data that needs to be processed by each output link, and improving the smoothness of the data transmitted by the edge routing node when passing through the surrounding link without blocking, avoiding the deadlock phenomenon caused by the surrounding link connection, thereby reducing the delay in data transmission, improving the data throughput of the edge routing node on the surrounding link, and optimizing the routing performance of the Torus network structure.
[0130] 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:
[0131] Step S201, obtaining information to be transmitted of the current routing node.
[0132] 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.
[0133] Step S202, parsing the information to be transmitted to obtain the corresponding source routing node and target routing node.
[0134] The header data of the message to be transmitted generally includes information indicating a source routing node and a target routing node.
[0135] 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.
[0136] The node graph is used to characterize the connection relationship between routing nodes in the Torus network structure. The edge routing nodes in the node graph are connected to the corresponding edge routing nodes in the node graph through dual-path output links. 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 details, please refer to Figure 2a Step S103 of the illustrated embodiment will not be described in detail here.
[0137] Step S204: when the current routing node is an edge routing node and the route determined based on the first routing indication coordinates crosses the edge routing node, determine routing information from the dual-path output links of the edge routing node according to the source routing node.
[0138] Among them, the first route 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 first route 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 based on the actual experience or preset rules of those skilled in the art). Specifically, a mathematical expression that can express the routing information can be constructed to present the first route indication coordinates, and this application does not limit this.
[0139] When the current routing node is an edge routing node, and the route determined based on the first routing indication coordinate crosses the edge routing node, it indicates that the routing condition required for judgment has been met. On the basis that the condition has been met, the source routing node of the information to be transmitted can be used as the basis for determining the output link during the information transmission process, and the information to be transmitted can be allocated to each output link in the dual output links.
[0140] 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 source routing node, such as information transmission efficiency, probability of congestion or output path options, and according to experience or preset rules, and the present application does not limit this.
[0141] The routing method based on the Torus network structure provided in the embodiment of the present application ensures the accuracy of the crossing edge routing node indicated by the determined first routing indication coordinates, because the first routing indication coordinates are determined based on the comparison result between the coordinate difference and the crossing threshold of the corresponding connection dimension in the coordinate difference. Therefore, when the current routing node is an edge routing node and the route determined based on the first routing indication coordinates crosses the edge routing node, when the routing information is determined from the dual-path output link of the edge routing node according to the source routing node, the accuracy of the routing conditions required to be judged is ensured, thereby improving the accuracy of the routing information determined from the dual-path output link of the edge routing node according to the source routing node.
[0142] In some optional implementations of step S204, the first route indication coordinates are determined based on the coordinate difference and the crossing threshold of the corresponding connection dimension in the coordinate difference, and may include: 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 inverted sign of the coordinate difference of the corresponding connection dimension and the number of jump steps is used as the first route indication coordinates of the corresponding connection dimension.
[0143] The crossing threshold corresponding to the connection dimension is obtained by rounding up half of the number of routing nodes corresponding to the connection dimension in the node graph.
[0144] Specifically, 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, indicating that the coordinate difference of the corresponding connection dimension in the coordinate difference between the target routing node and the current routing node crosses the edge routing node, and the first routing indication coordinate can be generated.
[0145] The jump step number is the number of routing nodes of the corresponding connection dimension in the node graph minus the absolute value of the corresponding difference, the sign of the first routing indication coordinate indicates the direction of the routing, and the value of the first routing indication coordinate indicates the number of routing steps.
[0146] When generating the first routing indication coordinates, in order to achieve the shortest routing path, reverse routing can be performed from the current routing node to the target routing node in the corresponding connection dimension of the above-mentioned crossing edge routing node, and the number of steps of the reverse routing is the number of jump steps, that is, the difference between the number of routing nodes of the corresponding connection dimension in the Torus network structure and the number of steps originally required for forward routing. Among them, the number of steps of the forward routing is the absolute value of the coordinate difference of the corresponding connection dimension.
[0147] After determining that the first routing indication coordinates need to be reversed and the number of steps of the reverse routing is determined, the product of the sign of the coordinate difference of the corresponding connection dimension and the jump step number is inverted as the first routing indication coordinates of the corresponding connection dimension.
[0148] The routing method based on the Torus network structure in this implementation method defines the generation conditions of the first routing indication coordinates 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, thereby ensuring the accuracy of the determined first 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, thereby ensuring the rationality and accuracy of the crossing threshold determined in the generation conditions of the first routing indication coordinates. The product of the sign of the coordinate difference of the corresponding connection dimension and the number of jump steps after the sign is inverted is used as the first 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, the sign of the first routing indication coordinate indicates the direction of the routing, and the value of the first routing indication coordinate indicates the number of steps of the routing. Here, the direction of the routing indicated by the first routing indication coordinate is reverse routing, and the number of steps of the routing is actually the number of routing nodes of the corresponding connection dimension minus the absolute value of the corresponding difference, thereby achieving the shortest path from the edge routing node to the target routing node, thereby ensuring the rationality and accuracy of the determined first routing indication coordinates.
[0149] In a specific example of the above optional implementation, taking a two-dimensional Torus network structure as an example, the above first routing indication coordinate is determined based on the coordinate difference and the crossing threshold of the corresponding connection dimension in the coordinate difference, including:
[0150]
[0151]
[0152] in, is the routing indication coordinate corresponding to the X-axis connection dimension in the first routing indication coordinate, is the routing indication coordinate corresponding to the Y-axis connection dimension in the first 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.
[0153] The routing method based on the Torus network structure provided in this example provides the generation conditions and formulas of the first routing indication coordinates for the case of a two-dimensional Torus network structure, and for the cases where the corresponding connection dimensions are the X-axis connection dimension and the Y-axis connection dimension, respectively. The direction of the route and the number of steps of the route indicated by the first routing indication coordinate 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 first routing indication coordinates.
[0154] In an optional embodiment of the present application, the routing information is determined from the dual-path output link of the edge routing node according to the source routing node in the above step 204, and the routing information can be determined from the dual-path output link of the direction of the route indicated by the symbol of the first routing indication coordinate according to whether the source routing node is an edge routing node.
[0155] Alternatively or additionally, the above step S204 may include the following steps:
[0156] Step S2041, when the current routing node is an edge routing node and the route determined based on the first routing indication coordinate crosses the edge routing node, if the source routing node is an edge routing node, a first route in a dual-path output link in the direction of the route indicated by the symbol of the first routing indication coordinate is selected.
[0157] The above-mentioned optional implementation manner of the present application provides a routing method based on a Torus network structure. When the current routing node is an edge routing node and the route determined based on the first routing indication coordinate crosses the edge routing node, if the source routing node is an edge routing node, the first route in the dual-path output link in the direction of the route indicated by the symbol of the first routing indication coordinate is used to limit the data from the first route in the dual-path output link, thereby reducing the amount of data from the first route in the dual-path output link, thereby reducing link congestion when routing across edge routing nodes, thereby avoiding deadlock.
[0158] Step S2042, when the current routing node is an edge routing node and the route determined based on the first routing indication coordinate crosses the edge routing node, if the source routing node is not an edge routing node, a second route in the dual-path output link in the direction of the route indicated by the symbol of the first routing indication coordinate is selected.
[0159] The above-mentioned optional implementation manner of the present application provides a routing method based on a Torus network structure. When the current routing node is an edge routing node and the route determined based on the first routing indication coordinate crosses the edge routing node, if the source routing node is not an edge routing node, the second route in the dual-path output link in the direction of the route indicated by the symbol of the first routing indication coordinate is limited to the data routed from the second route in the dual-path output link, and the amount of data routed from the second route in the dual-path output link is reduced, thereby reducing link congestion when routing across edge routing nodes, thereby avoiding deadlock.
[0160] In some optional implementations of this embodiment, the above-mentioned routing method based on the Torus network structure may further include:
[0161] Step S205: when the current routing node is an edge routing node and the route determined based on the second routing indication coordinates does not cross the edge routing node, output the link route from the single path of the edge routing node.
[0162] Among them, the second route 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 second route 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 based on the actual experience or preset rules of those skilled in the art). Specifically, a mathematical expression that can express the routing information can be constructed to present the second route indication coordinates, and this application does not limit this.
[0163] When the current routing node is an edge routing node and the route determined based on the second routing indication coordinates does not cross the edge routing node, it indicates that the current routing node is routed with an adjacent routing node other than the relative edge routing node, and can be routed from the single-path output link of the edge routing node to the adjacent routing node.
[0164] The routing method based on the Torus network structure provided in the above optional implementation of the present application is to route from the single-path output link of the edge routing node when the current routing node is an edge routing node and the route determined based on the coordinate difference does not cross the edge routing node; wherein the edge routing node in the node graph is connected to the adjacent routing nodes in the node graph except the relative edge routing node through the single-path output link. When the edge routing node does not need to pass through the surrounding link of the head and tail routing nodes of the corresponding connection dimension, the routing from the single-path output link of the edge routing node to the adjacent node is limited, thereby ensuring the accuracy of the routing link output from the edge routing node to the adjacent routing node. Together with the above-mentioned determination of routing information from the dual-path output link of the edge routing node, the smoothness and traffic efficiency of the overall routing in the Torus network structure are taken into account, and the routing performance of the Torus network structure is improved.
[0165] In some optional implementations of step S205, the second routing indication coordinates are determined based on the coordinate difference and the crossing threshold of the corresponding connection dimension in the coordinate difference, including: 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 second routing indication coordinates of the corresponding connection dimension.
[0166] The sign of the second route indication coordinate indicates the direction of the route, and the value of the second route indication coordinate indicates the number of steps of the route.
[0167] The routing method based on the Torus network structure provided by the above optional implementation of the present application defines the generation conditions of the second 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 second routing indication coordinates. The coordinate difference of the corresponding connection dimension is used as the second routing indication coordinate of the corresponding connection dimension, wherein the sign of the second routing indication coordinate indicates the direction of the routing, and the numerical value of the second 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 direction indicated by the sign of the second routing indication coordinate and the number of steps of the routing indicated by the numerical value of the second routing indication coordinate are used, thereby achieving the shortest path from the edge routing node to the target routing node, thereby ensuring the rationality and accuracy of the determined second routing indication coordinates.
[0168] In a specific example of the above optional implementation, taking a two-dimensional Torus network structure as an example, the above second routing indication coordinates are determined based on the coordinate difference and the crossing threshold of the corresponding connection dimension in the coordinate difference, and may include:
[0169]
[0170]
[0171] in, is the routing indication coordinate corresponding to the X-axis connection dimension in the second routing indication coordinate, is the routing indication coordinate corresponding to the Y-axis connection dimension in the second 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.
[0172] The routing method based on the Torus network structure provided in the above example of the present application, for the case of a two-dimensional Torus network structure, for the case where the corresponding connection dimensions are the X-axis connection dimension and the Y-axis connection dimension, respectively, provides the generation conditions and generation formulas of the second routing indication coordinates, wherein the direction of the route and the number of steps of the route determined based on the second 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 second routing indication coordinates.
[0173] In a specific example scenario of the above-mentioned 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 below. Figure 4a , Figure 4b , Figure 4c and Figure 4d , explaining how the routing method based on the Torus network structure in the embodiment of the present application can avoid deadlock in the routing process.
[0174] Specifically, after the current routing node obtains the information to be transmitted and parses the information to be transmitted to obtain the corresponding source routing node and target routing node, the following steps may be performed to avoid deadlock:
[0175] S1. According to the implementation method in step S104 or S204 in the above embodiment, it is determined whether there is a cross-edge routing node in the route indicated by the coordinate difference between the target routing node and the current routing node;
[0176] S2. According to the implementation of step S104 or S204 in the above embodiment, if there is a cross-edge routing node in the X-axis connection dimension, such as Figure 4a As shown, there is no deadlock when there are cross-edge routing nodes in the counterclockwise direction of the X-axis connection dimension; and Figure 4b As shown, there is no deadlock in the case where there are cross-edge routing nodes in the clockwise direction of the X-axis connection dimension;
[0177] S3. According to the implementation of step S104 or S204 in the above embodiment, if there is a cross-edge routing node in the Y-axis connection dimension, similar to the case where there is a cross-edge routing node in the X-axis connection dimension, there is no deadlock in the case where there is a cross-edge routing node in the counterclockwise direction and the clockwise direction of the Y-axis connection dimension;
[0178] S4. According to the implementation of step S104 or S204 in the above embodiment, if there are cross-edge routing nodes in both the X-axis direction and the Y-axis direction, such as Figure 4c As shown, there is no deadlock in the case where there are cross-edge routing nodes in the X-axis connection dimension and the Y-axis connection dimension;
[0179] S5. According to the implementation of step S105 or S205 in the above embodiment, if there is no cross-edge routing node in one or both of the X-axis connection dimension and the Y-axis connection dimension, such as Figure 4d As shown, there is no deadlock in the X-axis connection dimension and the Y-axis connection dimension.
[0180] In this embodiment, a Torus network structure is provided, which includes multiple routing nodes; the edge routing nodes in the routing nodes are connected to the corresponding edge routing nodes in the Torus network structure through dual-path output links; when the Torus network structure performs routing, the information to be transmitted of the current routing node is obtained; the information to be transmitted is parsed to obtain the corresponding source routing node and the 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; when the current routing node is an edge routing node and the route determined based on the coordinate difference crosses the edge routing node, the routing information is determined from the dual-path output link of the edge routing node according to the source routing node.
[0181] In some implementations of the above-mentioned Torus network structure, when the Torus network structure performs routing, when the current routing node is an edge routing node and the route determined based on the first routing indication coordinates crosses the edge routing node, the routing information is determined from the dual-path output link of the edge routing node according to the source routing node; wherein the first routing indication coordinates are determined based on the coordinate difference and the crossing threshold of the corresponding connection dimension in the coordinate difference.
[0182] In some embodiments 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 inverted sign of the coordinate difference of the corresponding connection dimension and the number of jump steps is used as the first routing indication coordinate of the corresponding connection dimension; wherein 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, the sign of the first routing indication coordinate indicates the direction of routing, and the numerical value of the first routing indication coordinate indicates the number of steps of routing.
[0183] In some embodiments of the above-mentioned Torus network structure, when the Torus network structure is performing routing, when the current routing node is an edge routing node and the route determined based on the first routing indication coordinate crosses the edge routing node, if the source routing node is an edge routing node, the first route in the dual-path output link in the direction of the route indicated by the symbol of the first routing indication coordinate is used.
[0184] In some embodiments of the above-mentioned Torus network structure, when the Torus network structure is performing routing, when the current routing node is an edge routing node and the route determined based on the first routing indication coordinate crosses the edge routing node, if the source routing node is not an edge routing node, the second route in the dual-path output link in the direction of the route indicated by the symbol of the first routing indication coordinate is routed.
[0185] In some implementations of the above-mentioned Torus network structure, when the Torus network structure performs routing, when the current routing node is an edge routing node and the route determined based on the coordinate difference does not cross the edge routing node, routing is performed from the single output link of the edge routing node; wherein the edge routing node in the node graph is connected to the adjacent routing nodes in the node graph except the relative edge routing node through the single output link.
[0186] In some implementations of the above-mentioned Torus network structure, when the Torus network structure performs routing, when the current routing node is an edge routing node and the route determined based on the second routing indication coordinates does not cross the edge routing node, the single-path output link route is taken from the edge routing node; wherein the second routing indication coordinates are determined based on the coordinate difference and the crossing threshold of the corresponding connection dimension in the coordinate difference.
[0187] In some embodiments 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 second routing indication coordinate of the corresponding connection dimension; wherein the sign of the second routing indication coordinate indicates the direction of routing, and the numerical value of the second routing indication coordinate indicates the number of steps of routing.
[0188] 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.
[0189] 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.
[0190] This embodiment provides a routing device based on the Torus network structure, such as Figure 5 As shown, including:
[0191] The information acquisition unit 301 is used to acquire the information to be transmitted of the current routing node;
[0192] The information parsing unit 302 is used to parse the information to be transmitted and obtain the corresponding source routing node and target routing node;
[0193] A difference determination unit 303 is used to determine 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 represent the connection relationship between routing nodes in the Torus network structure, and an edge routing node in the node graph is connected to a corresponding edge routing node in the node graph through a dual-path output link;
[0194] The route determination unit 304 is configured to determine the route information from the dual-path output links of the edge routing node according to the source routing node when the current routing node is an edge routing node and the route determined based on the coordinate difference crosses the edge routing node.
[0195] 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.
[0196] The embodiment of the present invention also provides an electronic device having the above Figure 5 The routing device shown is based on the Torus network structure.
[0197] See also Figure 6 , Figure 6 is a schematic diagram of the structure of an electronic device provided by an optional embodiment of the present invention, such as Figure 6As 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 6 A processor 10 is taken as an example.
[0198] 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.
[0199] 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.
[0200] 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.
[0201] 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.
[0202] 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 6 The example of connecting through bus is taken in the following.
[0203] 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.
[0204] 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.
[0205] 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 source routing node and a target routing node; Based on a node graph corresponding to a Torus network structure, determining a coordinate difference between the target routing node and the current routing node, wherein the node graph is used to characterize a connection relationship between routing nodes in the Torus network structure, and an edge routing node in the node graph is connected to a corresponding edge routing node in the node graph via a dual-path output link; When the current routing node is the edge routing node and the route determined based on the coordinate difference crosses the edge routing node, determining routing information from a dual-path output link of the edge routing node according to the source routing node, including: When the current routing node is the edge routing node and the route determined based on the first routing indication coordinate crosses the edge routing node, if the source routing node is the edge routing node, a first route in a dual-path output link in the direction of the route indicated by the sign of the first routing indication coordinate; When the current routing node is the edge routing node and the route determined based on the first routing indication coordinate crosses the edge routing node, if the source routing node is not the edge routing node, a second route in the dual-path output link in the direction of the route indicated by the sign of the first routing indication coordinate; The first route indication coordinates are determined based on the coordinate difference and a crossing threshold of a corresponding connection dimension in the coordinate difference.
2. The method according to claim 1, characterized in that The first route indication coordinate is determined based on the coordinate difference and a crossing threshold of a corresponding connection dimension in the coordinate difference, including: 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 first routing indication coordinate of the corresponding connection dimension; 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; The jump step number is the number of routing nodes of the corresponding connection dimension in the node graph minus the absolute value of the corresponding difference, the sign of the first routing indication coordinate indicates the direction of the routing, and the value of the first routing indication coordinate indicates the number of routing steps.
3. The method according to claim 2, characterized in that The first route indication coordinate is determined based on the coordinate difference and a crossing threshold of a corresponding connection dimension in the coordinate difference, including: in, is the routing indication coordinate corresponding to the X-axis connection dimension in the first routing indication coordinate, is the routing indication coordinate corresponding to the Y-axis connection dimension in the first 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.
4. The method according to claim 1, characterized in that The method further comprises: When the current routing node is the edge routing node and the route determined based on the coordinate difference does not cross the edge routing node, routing is performed from a single-path output link of the edge routing node; wherein the edge routing node in the node graph is connected to adjacent routing nodes in the node graph except the relative edge routing node through a single-path output link.
5. The method according to claim 4, characterized in that When the current routing node is the edge routing node and the route determined based on the coordinate difference does not cross the edge routing node, routing from a single output link of the edge routing node includes: When the current routing node is the edge routing node and the route determined based on the second routing indication coordinates does not cross the edge routing node, routing from a single output link of the edge routing node; The second route indication coordinates are determined based on the coordinate difference and a crossing threshold of a corresponding connection dimension in the coordinate difference.
6. The method according to claim 5, characterized in that The second route indication coordinate is determined based on the coordinate difference and a crossing threshold of a corresponding connection dimension in the coordinate difference, including: 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 second routing indication coordinate of the corresponding connection dimension; The sign of the second route indication coordinate indicates the direction of the route, and the value of the second route indication coordinate indicates the number of steps of the route.
7. The method according to claim 6, characterized in that The second route indication coordinate is determined based on the coordinate difference and a crossing threshold of a corresponding connection dimension in the coordinate difference, including: in, is the routing indication coordinate corresponding to the X-axis connection dimension in the second routing indication coordinate, is the routing indication coordinate corresponding to the Y-axis connection dimension in the second 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.
8. A Torus network structure, characterized in that: The Torus network structure includes a plurality of routing nodes; an edge routing node among the routing nodes is connected to a corresponding edge routing node in the Torus network structure via a dual-path output link; The Torus network structure obtains the information to be transmitted of the current routing node when performing routing; Parsing the information to be transmitted to obtain a corresponding source routing node and a 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; When the current routing node is the edge routing node and the route determined based on the coordinate difference crosses the edge routing node, determining routing information from a dual-path output link of the edge routing node according to the source routing node, including: When the current routing node is the edge routing node and the route determined based on the first routing indication coordinate crosses the edge routing node, if the source routing node is the edge routing node, a first route in a dual-path output link in the direction of the route indicated by the sign of the first routing indication coordinate; When the current routing node is the edge routing node and the route determined based on the first routing indication coordinate crosses the edge routing node, if the source routing node is not the edge routing node, a second route in the dual-path output link in the direction of the route indicated by the sign of the first routing indication coordinate; The first route indication coordinates are determined based on the coordinate difference and a crossing threshold of a corresponding connection dimension in the coordinate difference.
9. The Torus network structure according to claim 8, characterized in that: When the Torus network structure performs routing, 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 number of jump steps is inverted as the first routing indication coordinate of the corresponding connection dimension; The jump step number is the number of routing nodes of the corresponding connection dimension in the node graph minus the absolute value of the corresponding difference, the sign of the first routing indication coordinate indicates the direction of the routing, and the value of the first routing indication coordinate indicates the number of routing steps.
10. The Torus network structure according to claim 8, characterized in that: When the Torus network structure performs routing, When the current routing node is the edge routing node and the route determined based on the coordinate difference does not cross the edge routing node, routing is performed from a single-path output link of the edge routing node; wherein the edge routing node in the node graph is connected to adjacent routing nodes in the node graph except the relative edge routing node through a single-path output link.
11. The Torus network structure according to claim 10, characterized in that: When the Torus network structure performs routing, When the current routing node is the edge routing node and the route determined based on the second routing indication coordinates does not cross the edge routing node, routing from a single output link of the edge routing node; The second route indication coordinates are determined based on the coordinate difference and a crossing threshold of a corresponding connection dimension in the coordinate difference.
12. The Torus network structure according to claim 11, characterized in that: When the Torus network structure performs routing, 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 second routing indication coordinate of the corresponding connection dimension; The sign of the second route indication coordinate indicates the direction of the route, and the value of the second route indication coordinate indicates the number of steps of the route.
13. 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 to obtain a corresponding source routing node and a target routing node; a difference determination unit, configured to determine a 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 a connection relationship between routing nodes in the Torus network structure, and an edge routing node in the node graph is connected to a corresponding edge routing node in the node graph via a dual-path output link; A route determination unit, for determining routing information from a dual-path output link of the edge routing node according to the source routing node when the current routing node is the edge routing node and the route determined based on the coordinate difference crosses the edge routing node, including: when the current routing node is the edge routing node and the route determined based on the first routing indication coordinate crosses the edge routing node, if the source routing node is the edge routing node, a first route in the dual-path output link in the direction of the route indicated by the symbol of the first routing indication coordinate is selected; when the current routing node is the edge routing node and the route determined based on the first routing indication coordinate crosses the edge routing node, if the source routing node is not the edge routing node, a second route in the dual-path output link in the direction of the route indicated by the symbol of the first routing indication coordinate is selected; wherein the first routing indication coordinate is determined based on the coordinate difference and a crossing threshold of a corresponding connection dimension in the coordinate difference.
14. 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 7 by executing the computer instructions.
15. 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 7.
Citation Information
Patent Citations
No dead lock plane self-adapted routing method in 3-D mesh
CN101267394A
Non deal lock self-adapted routing method in 2-D torus network
CN101267398A
On-chip routing method and device, electronic equipment and storage medium
CN118041847A
Deadlock-free multipath routing for direct interconnect networks
WO2022269357A1
