Routing path determination method and device, medium and product
By using triangular prism side-prism routing rules and surface routing rules in the triangular prism topology of on-chip network, combined with the exclusive OR result of binary data, the routing path is determined, which solves the deadlock problem in the ring topology and improves communication efficiency and reliability sex.
Patent Information
- Application Number
- CN202411447905.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-10-16
AI Technical Summary
In the triangular topology of on-chip networks, communications of ring topology are prone to deadlocks, resulting in reduced communication efficiency and network paralysis.
By building a triangular network structure, the binary data of the source routing node and the target routing node are obtained, and the triangular prism side routing rules and triangular surface routing rules are used, combined with the XOR result of the binary data, the routing path is determined to avoid deadlocks.
It effectively avoids deadlock, improves communication reliability and efficiency, and ensures the normal operation of the on-chip network.
Smart Images

Figure CN119135593A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a method, device, medium and product for determining a routing path. Background Art
[0002] On-chip network is a new communication method for on-chip system and a major component of multi-core technology. It integrates computer network technology into the on-chip system. The data of each module is transmitted in the form of a switching network. The use of computer network technology effectively improves the data transmission performance.
[0003] In the network structure of the triangular prism topology of the on-chip network, for example, for a "ring" topology structure in which four routing nodes (node one, node two, node three and node four) are connected in sequence, routing is carried out in the same direction. When requesting a routing path, node one requests a routing request to node three, and the path from node one to node two is occupied. If you want to request a path from node two to node three, then the path from node two to node three is occupied, and so on. All paths are occupied. In this case, either the nodes are equal or a deadlock occurs in the communication of the ring topology, resulting in a complete paralysis of the on-chip network and affecting the efficiency of communication.
[0004] Therefore, how to avoid the reduction in communication efficiency caused by waiting and deadlock is a technical problem that technical personnel in this field urgently need to solve. Summary of the invention
[0005] The purpose of the present invention is to provide a method, device, medium and product for determining a routing path to solve the technical problem that a deadlock occurs in the communication of a ring topology structure, resulting in a complete paralysis of the on-chip network.
[0006] In order to solve the above technical problems, the present invention provides a method for determining a routing path, comprising: Constructing a triangular prism network structure, and obtaining a source routing node and a target routing node under the triangular prism network structure; wherein each vertex of the triangular prism network structure corresponds to a routing node, and the number of layers is at least one layer; When the source routing node and the target routing node are in the same layer, the corresponding routing path is determined according to the triangular prism side edge routing rule, the triangular prism surface routing rule and the relationship between the actual XOR results of the binary data corresponding to the source routing node and the target routing node; wherein the triangular prism side edge routing rule is a routing rule for routing the source routing node along the side edge corresponding to the source routing node to the triangular prism surface where the target routing node is located when the source routing node and the target routing node are not in the same triangular prism surface; the triangular prism surface routing rule is a routing rule for routing the source routing node along the triangular prism surface corresponding to the source routing node to the triangular prism edge where the target routing node is located when the source routing node and the target routing node are in the same triangular prism surface; the triangular prism surface includes the bottom surface and the top surface of the triangular prism; When the source routing node and the target routing node are not in the same layer, the source routing node is routed to the layer where the target routing node is located to obtain a new source routing node, and the corresponding routing path is determined according to the triangular prism side edge routing rule, the triangular prism surface routing rule and the relationship between the actual XOR results of the binary data corresponding to the new source routing node and the target routing node.
[0007] On the one hand, in the case of multi-layer triangular prism networks, the triangular prism networks of each layer are nested structures; The binary data of each routing node of the triangular prism network structure includes a hierarchical relationship for characterizing the triangular prism network; the target number of bits of binary data corresponding to the hierarchical relationship of each layer is the same; and the process of determining the target number of bits includes: Obtain the initial target number of bits of binary data of each routing node; The initial target number of digits is raised to a power of 2 to obtain a critical number of layers; If the critical number of layers is less than the target number of layers of the triangular prism network structure, then add 1 to the initial target number of layers to obtain the first target number of layers, take the first target number of layers as the new initial target number of layers, and return to the step of raising the target number of layers to the power of 2 to obtain the critical number of layers, until the obtained critical number of layers is equal to or greater than the target number of layers of the triangular prism network structure, and take the first target number of layers as the target number of layers corresponding to the target number of layers.
[0008] On the other hand, the XOR result of the binary data of each routing node on the same side edge of the triangular prism network corresponding to the same layer under the triangular prism network structure is the second target bit threshold; The XOR result of the binary data of each routing node on the same triangular prism surface of the triangular prism network corresponding to the same layer under the triangular prism network structure is the third target bit number threshold.
[0009] On the other hand, the process of determining that the source routing node and the target routing node are at the same layer includes: Obtain binary data corresponding to the source routing node and the target routing node respectively; Perform bitwise XOR operation on the binary data corresponding to the source routing node and the target routing node to obtain the actual XOR result; If the target number of bits of the actual XOR result is the first target number of bits threshold, it is determined that the source routing node and the target routing node are not in the same layer; If the target number of bits of the actual XOR result is the second target number of bits threshold, it is determined that the source routing node and the target routing node are in the same layer; wherein the first target number of bits threshold and the second target number of bits threshold are different.
[0010] On the other hand, if the triangular prism network structure has two layers, the highest bit of the binary data of the routing nodes of the outer triangular prism network structure is 1, and the highest bit of the binary data of the routing nodes of the inner triangular prism network structure is 0.
[0011] On the other hand, the corresponding routing path is determined according to the triangular prism side edge routing rule, the triangular prism surface routing rule, and the relationship between the actual XOR results of the binary data corresponding to the source routing node and the target routing node, including: Determine whether the actual XOR result is the first reference XOR result; If it is the first reference XOR result, determining that the source routing node and the target routing node are on different triangular prism surfaces of the triangular prism network of the same layer, and determining the corresponding routing path according to the relationship between the triangular prism side edge routing rule and the triangular prism surface routing rule and the actual XOR result of the binary data corresponding to the source routing node and the target routing node; If it is not the first reference XOR result, determining whether the actual XOR result is a third target bit number threshold; If it is the third target bit number threshold, it is determined that the source routing node and the target routing node are on the same triangular prism surface of the triangular prism network of the same layer, and the corresponding routing path is determined according to the triangular prism surface routing rule and the relationship between the actual XOR results of the binary data corresponding to the source routing node and the target routing node.
[0012] On the other hand, determining the corresponding routing path according to the triangular prism side edge routing rule and the triangular prism surface routing rule and the relationship between the actual XOR results of the binary data corresponding to the source routing node and the target routing node includes: Performing a bitwise XOR operation on the binary data corresponding to the source routing node and the second target bit threshold to obtain a first XOR result; Routing the first XOR result as a source routing node along a side edge to a first source routing node on the same triangular prism surface as the target routing node; Routing the first source routing node to the target routing node according to a triangular prism routing rule; The path between the source routing node, the first source routing node and the target routing node is used as the routing path.
[0013] On the other hand, the third target bit number threshold includes a second reference XOR result and a third reference XOR result, wherein the second reference XOR result is used to characterize that the binary data corresponding to the two routing nodes are the same; the third reference XOR result is used to characterize that the two routing nodes are directly connected; and the corresponding routing path is determined according to the triangular prism routing rule and the relationship between the actual XOR results of the binary data corresponding to the source routing node and the target routing node, including: Determine whether the actual XOR result is the second reference XOR result; If it is the second reference XOR result, the source routing node is determined to be the target routing node, and the routing ends; If it is not the second reference XOR result, determining whether the actual XOR result is the third reference XOR result; If it is the third reference XOR result, it is determined that the source routing node and the target routing node are directly connected, and the path corresponding to the source routing node to the target routing node is used as the final path.
[0014] On the other hand, routing the source routing node to the layer where the target routing node is located to obtain a new source routing node, including: Obtaining binary data and a reference XOR result of a source routing node, wherein the reference XOR result is an XOR result of binary data of any two routing nodes in a triangular prism network structure; Performing an XOR operation on the binary data of the source routing node and the reference XOR result to obtain a second source routing node in an adjacent layer in a direction in which the source routing node approaches the target routing node; Performing an XOR operation on the binary data of the second source routing node and the reference XOR result to obtain a third source routing node of an adjacent layer in a direction in which the second source routing node approaches the target routing node, until a new source routing node of the layer to which the target routing node belongs is obtained; Alternatively, the adjacent routing nodes of the source routing node are obtained based on the triangular prism network structure; Selecting a routing node in a different layer from the source routing node from the adjacent routing nodes as a fourth source routing node in an adjacent layer in a direction in which the source routing node approaches the target routing node; Based on the fourth source routing node, a corresponding adjacent routing node is acquired until a new source routing node of the layer to which the target routing node belongs is obtained.
[0015] On the other hand, the process of determining the binary data corresponding to a routing node includes: Get the binary data corresponding to each bit; Select bits greater than the total number of routing nodes from the number of binary data corresponding to each bit as initial bits; Determine, within the initial bits, an initial bit closest to the total number of routing nodes as a target bit; The binary data of the target bit is determined according to the target bit to determine the binary data corresponding to the routing node.
[0016] On the other hand, when the source routing node and the target routing node are at the same layer, the method further includes: The corresponding routing path is determined according to the preset routing rules, the triangular prism side edge routing rules, the triangular prism surface routing rules and the relationship between the actual XOR results of the binary data corresponding to the source routing node and the target routing node; wherein the preset routing rules are determined by the shortest path rule, the threshold rule of the XOR threshold of the binary data of any two routing nodes and the multi-request link rule; the multi-request link rule is a link rule that allows a preset number of valid mark requests in the same direction of the communication link; the number of request links of the multi-link of the multi-request link rule is greater than the preset number, and the valid mark request is at the first hop or the second hop of the indirect connection relationship between the source routing node and the target routing node; the shortest path rule is that the shortest path between any two routing nodes is less than or equal to the network diameter of the triangular prism network structure.
[0017] On the other hand, when the source routing node and the target routing node are at the same layer, the method further includes: The corresponding routing path is determined according to the preset routing rules, the triangular prism side edge routing rules, the triangular prism surface routing rules and the relationship between the actual XOR results of the binary data corresponding to the source routing node and the target routing node; wherein the preset routing rules are determined by the shortest path rule, the threshold rule of the XOR threshold of the binary data of any two routing nodes and the multi-path link rule; the multi-path link rule is a link rule that allows one valid marked path in the same direction of the communication link, and the valid marked path is the first hop of the indirect connection relationship between the source routing node and the target routing node; the shortest path rule is that the shortest path between any two routing nodes is less than or equal to the network diameter of the triangular prism network structure.
[0018] In order to solve the above technical problems, the present invention also provides a routing path determination device, comprising: Memory for storing computer programs; The processor is used to implement the steps of the routing path determination method as described above when executing the computer program.
[0019] In order to solve the above technical problem, the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the routing path determination method as described above are implemented.
[0020] In order to solve the above technical problem, the present invention also provides a computer program product, including a computer program / instruction, which implements the steps of the routing path determination method as described above when executed by a processor.
[0021] The present invention provides a method for determining a routing path, constructing a triangular prism network structure, and obtaining a source routing node and a target routing node under the triangular prism network structure; wherein each vertex of the triangular prism network structure corresponds to a routing node, and the number of layers is at least one layer; when the source routing node and the target routing node are in the same layer, the corresponding routing path is determined according to the triangular prism side edge routing rule, the triangular prism surface routing rule, and the relationship between the actual XOR results of the binary data corresponding to the source routing node and the target routing node; wherein the triangular prism side edge routing rule is that when the source routing node and the target routing node are not in the same triangular prism surface, the source routing node is routed to the target along the side edge corresponding to the source routing node. The routing rule of the triangular prism surface where the routing node is located; the triangular prism surface routing rule is the routing rule that when the source routing node and the target routing node are in the same triangular prism surface, the source routing node is routed to the triangular prism edge where the target routing node is located along the triangular prism surface corresponding to the source routing node; the triangular prism surface includes the bottom surface and the top surface of the triangular prism; when the source routing node and the target routing node are not in the same layer, the source routing node is routed to the layer where the target routing node is located to obtain a new source routing node, and the corresponding routing path is determined according to the relationship between the triangular prism side edge routing rule, the triangular prism surface routing rule and the actual XOR result of the binary data corresponding to the new source routing node and the target routing node.
[0022] The beneficial effect of the present invention is that on the basis of the triangular prism network structure, the path planning of the source routing node and the target routing node is determined by the relationship between the triangular prism side edge routing rules, the triangular prism surface routing rules and the actual XOR results of the two routing nodes when they are in the same layer. Among them, the triangular prism side edge routing rule is to give priority to the side edge routing when they are not in the same triangular prism surface, so that the routing path is shorter, and the two routing nodes are finally moved to the same triangular prism surface. The routing rule of the triangular prism surface is based on the routing rule of routing along the triangular prism surface when the same surface is used. The flexibility and diversity of the routing path are determined according to different rules to avoid deadlock. When in different layers, it is necessary to jump to the same layer for routing planning. Whether in the triangular prism network structure of the same layer or different layers, the problem of time extension of equal position correspondence when repeated routing nodes pass by is avoided, and the deadlock caused by the formation of a "ring" topology structure is avoided, thereby ensuring the reliability of communication.
[0023] Secondly, the process of determining the binary data corresponding to the routing node makes full use of the binary data to represent the routing node. Compared with the arrangement of serial numbers, this embodiment is more direct through XOR processing in the subsequent routing calculation process. In addition, the number of bits determined by the total number of routing nodes takes into account the reduction of data calculation in the representation process. Through the XOR operation to determine the same-layer process of the source routing node and the target routing node, the same-layer relationship between the two can be determined simply and clearly. If the number of layers of the triangular prism network structure is double-layer, the highest bit of the binary data of the routing node of the outer triangular prism network structure is 1, and the highest bit of the binary data of the routing node of the inner triangular prism network structure is 0. In order to distinguish the triangular prism network structure in which the two routing nodes are in the same layer or different layers, the subsequent routing calculation of the routing path is simple. In the judgment process of the actual XOR result and the first reference XOR result, it means that the corresponding routing rules and the actual XOR result determine the corresponding routing path in the case of different triangular prism surfaces and the same triangular prism surface of the triangular prism network in the same layer, so that the accuracy of the determined routing path is improved to avoid deadlock. The source routing node is routed to a new source routing node in the layer to which the target routing node belongs, thereby improving the diversity and flexibility of the jump method. Two marking methods, the shortest path rule realizes the shortest distance determination of the routing path, and the threshold rule of the XOR threshold simplifies the determination process through the XOR operation. The multi-link rule includes the multi-request link rule and the multi-path link rule. The multi-request link rule takes into account that there are two directional paths in the multi-request link between two routing nodes. Multiple links under each directional path correspond to multiple marking requests. When requesting a path, only a preset number of valid marking requests are allowed to pass, thus avoiding the corresponding deadlock scenario when all valid marking requests corresponding to multiple links pass. In addition, the multi-request link rule based on the request mark can flexibly set the corresponding routing path, improve flexibility while avoiding deadlock, and the multi-path link rule enriches the diversity of path determination.
[0024] In addition, the present invention also provides a routing path determination device, a medium and a product, which have the same beneficial effects as the above-mentioned routing path determination method. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0026] Figure 1 A schematic diagram of a ring structure of a conventional topological structure; Figure 2Schematic diagram of deadlock generated clockwise for a conventional ring topology; Figure 3 Schematic diagram of the counterclockwise deadlock generated by the conventional switching topology; Figure 4 A flowchart of a method for determining a routing path provided by an embodiment of the present invention; Figure 5 A schematic diagram of a triangular prism network structure of routing nodes represented by binary data provided by an embodiment of the present invention; Figure 6 A schematic diagram of the top surface, bottom surface, and side edges of a triangular prism provided in an embodiment of the present invention; Figure 7 A schematic diagram of a triangular prism ring structure with different layers provided by an embodiment of the present invention; Figure 8 A schematic diagram of an outer triangular prism ring structure provided by an embodiment of the present invention; Fig. 9 A structural diagram of a routing path determination device provided by an embodiment of the present invention; Fig.10 A structural diagram of a routing path determination device provided by an embodiment of the present invention; Fig.11 A schematic diagram of routing node coding, port numbering and corresponding width of an outer triangular prism network structure provided by an embodiment of the present invention; Fig.12 A schematic diagram of routing node coding, port numbering and corresponding width of an inner triangular prism network structure provided by an embodiment of the present invention; Fig.13 A routing node distribution diagram of a port node X16 of a double-layer triangular prism network structure provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0027] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0028] The core of the present invention is to provide a method, device, medium and product for determining a routing path to solve the technical problem that a deadlock in the communication of a ring topology structure causes a complete paralysis of the on-chip network.
[0029] In order to enable those skilled in the art to better understand the solution of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0030] The triangular prism network structure has a "ring" topology, which may cause deadlock in extreme scenarios, so it is necessary to consider solving the deadlock problem in certain scenarios. Figure 1 A schematic diagram of a ring structure of a conventional topological structure is shown in FIG. Figure 1 As shown in the figure, the ring topology is prone to deadlock. For example, suppose there are four routing requests at the same time: 1. Routing node 2 to routing node 7, 2. Routing node 3 to routing node 6, 3. Routing node 7 to routing node 2, 4. Routing node 6 to routing node 3. These four routing requests need to pass through a routing node and all choose clockwise routing. When all of them have occupied the middle routing node, a deadlock will occur. Figure 2 Schematic diagram of deadlock caused by clockwise rotation of conventional ring topology. Figure 3 The schematic diagram of the conventional topology structure that generates deadlock counterclockwise is as follows: Figure 2 , 3 As shown, once deadlock occurs, it will cause the Internet to be completely paralyzed. The routing path determination method provided by the present invention can solve the above technical problems.
[0031] Figure 4 A flowchart of a method for determining a routing path provided by an embodiment of the present invention is shown in FIG. Figure 4 As shown, the method includes: S11: construct a triangular prism network structure, and obtain a source routing node and a target routing node under the triangular prism network structure; Among them, each vertex of the triangular prism network structure corresponds to a routing node, and the number of layers is at least one; S12: Determine whether the source routing node and the target routing node belong to the same layer of the triangular prism network structure, if so, proceed to step S13, if not, proceed to step S14; S13: When the source routing node and the target routing node are in the same layer, determine the corresponding routing path according to the triangular prism side edge routing rule, the triangular prism surface routing rule, and the relationship between the actual XOR results of the binary data corresponding to the source routing node and the target routing node; Among them, the triangular prism side edge routing rule is a routing rule that the source routing node is routed along the side edge corresponding to the source routing node to the triangular prism surface where the target routing node is located when the source routing node and the target routing node are not located on the same triangular prism surface; the triangular prism surface routing rule is a routing rule that the source routing node is routed along the triangular prism surface corresponding to the source routing node to the triangular prism edge where the target routing node is located when the source routing node and the target routing node are located on the same triangular prism surface; the triangular prism surface includes the bottom surface and the top surface of the triangular prism; S14: When the source routing node and the target routing node are not in the same layer, the source routing node is routed to the layer where the target routing node is located to obtain a new source routing node, and the corresponding routing path is determined according to the triangular prism side edge routing rule, the triangular prism surface routing rule and the relationship between the actual XOR results of the binary data corresponding to the new source routing node and the target routing node.
[0032] Specifically, the process of determining the number of layers of the triangular prism network structure is as follows: The target number of layers of the triangular prism network structure is determined based on the number of servers and the number of routing nodes of the triangular prism of the unit layer, including: Get the preset port node quantity threshold value connected to the routing node; Determine the total number of routing nodes in the triangular prism network structure based on the relationship between the preset port node quantity threshold value connected to the routing node and the number of servers; The target number of layers of the triangular prism network structure is determined according to the relationship between the total number of routing nodes and the number of routing nodes of the triangular prism of the unit layer.
[0033] It can be understood that since the number of routing nodes of the triangular prisms in the unit layer is fixed, that is, there are 6 vertices in a triangular prism, the number of routing nodes determined based on the number of servers and the number of routing nodes of the triangular prisms in the unit layer can also obtain the target number of layers of the triangular prism network structure. The triangular prisms corresponding to the target number of layers are nested with each other to obtain a triangular prism network structure. The nesting here is full nesting. If the target number of layers is double, one triangular prism network is nested in another triangular prism network, so that the vertices of each triangular prism network have corresponding vertex connections, and the corresponding three-dimensional shapes of each triangular prism network are the same, the side prisms are parallel to each other, and the planes of each prism are also parallel to each other.
[0034] The network diameter corresponding to the mutual visit between port nodes is less than or equal to the network diameter of the triangular prism network structure. The network diameter is the maximum value of the minimum distance between any two nodes in the network. In other words, the network diameter of a single-layer triangular prism network structure is 2, and the network diameter of a three-layer triangular prism network structure is 3. The maximum network diameter between each port node is the network diameter of the triangular prism network structure in which it is located.
[0035] Specifically, the number of layers of the triangular prism network structure adopted is based on the preset port node number threshold for a routing node to be connected. The relationship between the number of servers and the preset port node number threshold can determine the total number of routing nodes in the triangular prism network structure, and then the target number of layers of the triangular prism network structure is determined based on the relationship between the total number of routing nodes and the number of routing nodes of the triangular prism in the unit layer.
[0036] In this embodiment, by determining the triangular prism network structure of the target number of layers, the routing nodes are all connected to the port nodes, and the routing nodes are fully utilized so that the routing nodes not only play the role of routing, but also have the function of connecting the port nodes. At the same time, based on the triangular prism network of the target number of layers, the corresponding network diameter is also determined, further shortening the routing transmission distance.
[0037] The source routing node and the target routing node obtained based on the triangular prism network structure, the source routing node is the node of the message request initiated by the port node connected to the routing node, and the target routing node is the node corresponding to the port node responded by the routing node. The selection of routing nodes here is all based on the routing nodes of the triangular prism network structure, and the corresponding selection process can be based on the settings of servers under different port nodes, or based on different communication task settings, etc., which are not limited here, or based on the source routing node and the target routing node determined by the routing request.
[0038] The triangular prism network structure is constructed by the above-mentioned triangular prism network structure construction method, and the corresponding triangular prism network structure has at least one layer, that is, a single-layer triangular prism network or a multi-layer network structure.
[0039] Whether the source routing node and the target routing node are in the same layer can be checked through the routing node number and the topology display diagram of the triangular prism network topology structure, or can be determined through the binary data of the layer flag bits of the source routing node and the target routing node. When the source routing node and the target routing node are not in the same layer of the triangular prism network structure, this includes the source routing node and the target routing node being in adjacent layers, or being separated by N layers (N is greater than 2).
[0040] In some embodiments, when there are multiple layers of triangular prism networks, the triangular prism networks of each layer are nested structures; The binary data of each routing node of the triangular prism network structure includes a hierarchical relationship for characterizing the triangular prism network; the target number of bits of binary data corresponding to the hierarchical relationship of each layer is the same; and the process of determining the target number of bits includes: Obtain the initial target number of bits of binary data of each routing node; The initial target number of digits is raised to the power of 2 to obtain the critical number of layers; If the critical number of layers is less than the target number of layers of the triangular prism network structure, then add 1 to the initial target number of layers to obtain the first target number of layers, take the first target number of layers as the new initial target number of layers, and return to the step of raising the initial target number of layers to the power of 2 to obtain the critical number of layers, until the obtained critical number of layers is equal to or greater than the target number of layers of the triangular prism network structure, and take the first target number of layers as the target number of layers corresponding to the target number of layers.
[0041] Specifically, the target number of bits of binary data of each routing node of the triangular prism is first tried with the initial target number of bits. If the initial target number of bits is raised to the power of 2 to obtain N, which is the critical number of layers, that is, the maximum number of layers, and its maximum number of layers is less than the target number of layers of the triangular prism network structure, it means that the corresponding initial target number of bits cannot cover all routing nodes, and it is necessary to add 1 to the initial target number of bits to obtain the first target number of bits, and continue to check whether it is less than the target number of layers of the triangular prism network structure. If not, the first target number of bits is used as the final target number of bits corresponding to the target number of layers.
[0042] In another embodiment, a process of determining binary data corresponding to a routing node includes: Get the binary data corresponding to each bit; Select bits greater than the total number of routing nodes from the number of binary data corresponding to each bit as initial bits; Determine, within the initial bits, an initial bit closest to the total number of routing nodes as a target bit; The binary data of the target bit is determined according to the target bit to determine the binary data corresponding to the routing node.
[0043] Specifically, in this embodiment, the binary data of each bit is obtained. This is only a reference data. The binary data of 1 bit includes 1 and 0, the binary data of 2 bits includes 10, 01, 00 and 11, and so on. It can be understood that not all bits of binary data are listed, but are set based on actual conditions. Determine how many binary data can be represented in the binary data corresponding to each bit, such as 1 bit of binary data is 2 1 =2, 2-bit binary data is 2 2 =4. The binary data corresponding to each bit is filtered out from the number of binary data corresponding to each bit, which is greater than the initial bit of the total number of routing nodes. For example, the total number of routing nodes is 6, and the obtained bits are 2bit, 3bit, 4bit, etc., and the corresponding number of binary data of each bit is 4, 8, 16, etc. Among them, the initial bits greater than the total number of routing nodes are 3bit, 4bit, etc. Among them, the initial bit closest to the total number of routing nodes is 3bit, so 3bit is used as the target bit, that is, 3bit of binary data is enough to be identified in the triangular prism network structure composed of 6 routing nodes.
[0044] Figure 5 A schematic diagram of a triangular prism network structure of a routing node represented by binary data provided by an embodiment of the present invention, such as Figure 5 As shown, the double-layer triangular prism network structure has a total of 12 routing nodes, and the routing nodes are represented by 4-bit binary data, that is, the label of each routing node is 4 bits.
[0045] The process of determining the binary data corresponding to the routing node provided in this embodiment makes full use of binary data to represent the routing node. Compared with the arrangement of serial numbers, this embodiment is more direct through XOR processing in the subsequent routing calculation process. In addition, the number of bits determined by the total number of routing nodes takes into account the reduction of data calculation in the data representation process.
[0046] In some embodiments, the relationship between the binary data corresponding to each routing node is as follows: Get the binary data of the current routing node; Determine a ninth XOR result according to the binary data of the current routing node and the binary data of the routing node to be directly connected; If the ninth XOR result is the same as the first threshold, the binary data of the routing node to be directly connected is used as the binary data of the routing node adjacent to the current routing node.
[0047] It should be noted that after determining the specific bits of the binary data of the routing node, in the triangular prism network structure, the binary data of each routing node is not randomly set, but the binary data of adjacent routing nodes, the binary data of routing nodes on the same layer, the binary data of routing nodes of the side prisms on the same layer, or the binary data of coplanar routing nodes on the same layer, etc. have different rules, which can be set based on actual conditions. In addition, not all binary data corresponding to specific bits can be applied to routing nodes, and whether the corresponding binary data meets the setting of the first threshold must also be considered. Therefore, to obtain the binary data of the current routing node, the current routing node can be selected at will, and if the corresponding connection rule is not formed, it can be replaced.
[0048] The ninth XOR result is determined based on the binary data of the current routing node and the binary data of the routing node to be directly connected. If the ninth XOR result is the same as the first threshold, the binary data of the routing node to be directly connected is used as the binary data of the routing node adjacent to the current routing node. In other words, the XOR result of the binary data between the current routing node and the directly connected routing node (adjacent routing node) is the same as the first threshold. For example, the first threshold is 1000, the lower three bits are equal, and the highest bit is opposite.
[0049] The actual XOR result of the binary data corresponding to the source routing node and the target routing node is obtained by performing bitwise XOR operation on the binary data corresponding to the source routing node and the target routing node, respectively. Of course, XOR can also be performed based on data with a fixed number of bits of binary data.
[0050] In step S13, if the source routing node and the target routing node belong to the same layer, the triangular prism side edge routing rule is a routing rule that gives priority to the side edge routing to the triangular prism surface where the target routing node is located when the two routing nodes are in different triangular prism surfaces. The triangular prism road surface rule is based on the same triangular prism surface, and the triangular prism surface routing rule is a routing rule that directly connects two routing nodes in the same triangular prism surface, and follows the triangular prism edge corresponding to the target routing node on the triangular prism surface. Figure 6 A schematic diagram of the top surface, bottom surface, and side edges of a triangular prism provided in an embodiment of the present invention is shown in FIG. Figure 6 As shown, there is a certain distinction between the triangular prism edges and the side edges. The triangular prism edges are based on the side edges corresponding to the bottom and top surfaces of the triangular prism surface, and the side edges of the triangular prism are based on the three side edges between the bottom and top surfaces.
[0051] The routing path is determined based on the relationship between the actual XOR result and the triangular prism side edge routing rule and the triangular prism road surface rule. In step S14, if the source routing node and the target routing node do not belong to the same layer, the source routing node needs to be updated and jumped to the new source routing node so that the new source routing node and the target routing node belong to the same layer. After the same layer, the judgment process of determining the routing path is the same as that in step S13, which will not be repeated here.
[0052] The present invention provides a method for determining a routing path, constructing a triangular prism network structure, and obtaining a source routing node and a target routing node under the triangular prism network structure; wherein each vertex of the triangular prism network structure corresponds to a routing node, and the number of layers is at least one layer; when the source routing node and the target routing node are in the same layer, the corresponding routing path is determined according to the triangular prism side edge routing rule, the triangular prism surface routing rule, and the relationship between the actual XOR results of the binary data corresponding to the source routing node and the target routing node; wherein the triangular prism side edge routing rule is that when the source routing node and the target routing node are not in the same triangular prism surface, the source routing node is routed to the target along the side edge corresponding to the source routing node. The routing rules of the triangular prism where the routing node is located; the triangular prism routing rules are the routing rules that the source routing node is routed to the triangular prism edge where the target routing node is located along the triangular prism corresponding to the source routing node when the source routing node and the target routing node are in the same triangular prism; the triangular prism includes the bottom and top surfaces of the triangular prism; when the source routing node and the target routing node are not in the same layer, the source routing node is routed to the layer where the target routing node is located to obtain a new source routing node, and the corresponding routing path is determined according to the triangular prism side edge routing rules, the triangular prism surface routing rules, and the relationship between the actual XOR results of the binary data corresponding to the new source routing node and the target routing node. On the basis of the triangular prism network structure, the path planning of the source routing node and the target routing node is determined by the triangular prism side edge routing rules, the triangular prism surface routing rules, and the relationship between the actual XOR results of the two routing nodes when they are in the same layer. Among them, the triangular prism side edge routing rule is to give priority to the side edge routing when they are not in the same triangular prism surface, so that the routing path is shorter, so that the two routing nodes are finally moved to the same triangular prism surface. The routing rules of the triangular prism are based on the routing rules along the triangular prism when the same surface is used. The flexibility and diversity of the routing path are determined according to different rules to avoid deadlock. When in different layers, it is necessary to jump to the same layer for routing planning. Whether in the triangular prism network structure of the same layer or different layers, the problem of time extension of equal position correspondence when repeated routing nodes pass through is avoided, and the deadlock caused by the formation of a "ring" topology structure is avoided to ensure the reliability of communication.
[0053] In some embodiments, the XOR result of the binary data of each routing node on the same side edge of the triangular prism network corresponding to the same layer in the triangular prism network structure is the second target bit threshold; Under the triangular prism network structure, the XOR result of the binary data of each routing node on the same triangular prism surface of the triangular prism network corresponding to the same layer is the third target bit threshold.
[0054] It can be understood that the XOR result of the binary data of each routing node on the same side edge of the triangular prism network corresponding to the same layer under the triangular prism network structure is the second target bit number threshold, that is, 0100, that is, the XOR results corresponding to the two routing nodes on any side edge are the second target bit number threshold. The XOR result of the binary data of each routing node on the same triangular prism surface of the triangular prism network on the same layer is the third target bit number threshold, which can be one or more data, that is, 00XX data.
[0055] In some embodiments, the process of determining that the source routing node and the target routing node are in the same layer includes: Obtain binary data corresponding to the source routing node and the target routing node respectively; Perform bitwise XOR operation on the binary data corresponding to the source routing node and the target routing node to obtain the actual XOR result; If the target number of bits of the actual XOR result is the first target number of bits threshold, it is determined that the source routing node and the target routing node are not in the same layer; If the target number of bits of the actual XOR result is the second target number of bits threshold, it is determined that the source routing node and the target routing node are in the same layer; wherein the first target number of bits threshold and the second target number of bits threshold are different.
[0056] Specifically, when setting the binary data of the routing nodes of the triangular prism network structure, taking into account the general term and the routing determination of different layers, the highest bit of the binary data is marked as the layer. For a double-layer triangular prism network structure, the highest bit of the outer triangular prism network structure is 1, and the highest bit of the inner triangular prism network structure is 0. Through the XOR rule of 0 for the same and 1 for different, it can be determined that when the highest bit of the actual XOR result is 1, the source routing node and the target routing node do not belong to the same layer. Similarly, when the highest bit of the actual XOR result is 0, the source routing node and the target routing node belong to the same layer.
[0057] In addition, the present embodiment may be a multi-layer triangular prism network. For the case of a multi-layer (greater than 2 layers) triangular prism network, it is required that the first target number of bits of the actual XOR result meet the first target number threshold or the second target number threshold. For example, for a three-layer triangular prism network, the corresponding target number of bits can be represented by 00, 01, 10, and 11, and each layer is represented by 2 bits of data. The corresponding actual first target number threshold and second target number threshold are set. No limitation is made here, as long as the relationship between different layers is distinguished.
[0058] The process of determining whether a source routing node and a target routing node are at the same layer by using an XOR operation provided in this embodiment can simply and clearly determine the relationship between the two at the same layer.
[0059] In some embodiments, if the triangular prism network structure has two layers, the highest bit of binary data of the routing nodes of the outer triangular prism network structure is 1, and the highest bit of binary data of the routing nodes of the inner triangular prism network structure is 0.
[0060] Specifically, based on the highest bit setting of the binary data of the routing nodes of the triangular prism network structure of different layers, the highest bit of the binary data of the routing nodes of the outer triangular prism network structure is 1, and the highest bit of the binary data of the routing nodes of the inner triangular prism network structure is 0. Here, only a two-layer consideration is made, that is, one bit of the binary data of a routing node represents the identification of the triangular prism network structure at different layers. If there are three or more layers of triangular prism network structures, multi-bit data may be used to represent the different layers of the triangular prism network structure. For statistical convenience, the first few bits of binary data can be selected to set the identification of different layers, such as the first two bits of binary data are used for the identification of different layers. For example, if there are 4 layers of triangular prism network structures, the first two bits of binary data of the routing nodes corresponding to the triangular prism network structure of the first layer are 00, the first two bits of binary data of the routing nodes corresponding to the triangular prism network structure of the second layer are 01, the first two bits of binary data of the routing nodes corresponding to the triangular prism network structure of the third layer are 10, and the first two bits of binary data of the routing nodes corresponding to the triangular prism network structure of the fourth layer are 11.
[0061] In the embodiment of the present invention, if the number of layers of the triangular prism network structure is two layers, the highest bit of the binary data of the routing node of the outer triangular prism network structure is 1, and the highest bit of the binary data of the routing node of the inner triangular prism network structure is 0, in order to distinguish whether two routing nodes are in the same layer or different layers of the triangular prism network structure, so as to simplify the routing calculation of the subsequent routing path.
[0062] In some embodiments, determining a corresponding routing path according to a triangular prism side edge routing rule, a triangular prism surface routing rule, and a relationship between actual XOR results of binary data corresponding to a source routing node and a target routing node includes: Determine whether the actual XOR result is the first reference XOR result; If it is the first reference XOR result, determine that the source routing node and the target routing node are on different triangular prism surfaces of the triangular prism network of the same layer, and determine the corresponding routing path according to the relationship between the triangular prism side edge routing rule and the triangular prism surface routing rule and the actual XOR result of the binary data corresponding to the source routing node and the target routing node; If it is not the first reference XOR result, determining whether the actual XOR result is a third target bit number threshold; If it is the third target bit number threshold, it is determined that the source routing node and the target routing node are on the same triangular prism surface of the triangular prism network at the same layer, and the corresponding routing path is determined according to the triangular prism surface routing rule and the relationship between the actual XOR results of the binary data corresponding to the source routing node and the target routing node.
[0063] Specifically, determine whether the actual XOR result is the first reference XOR threshold. If so, it means that the two routing nodes are on different triangular prism surfaces of the triangular prism network of the same layer. It is necessary to determine the corresponding routing path based on the relationship between the two routing rules (triangular prism side edge routing rule and triangular prism surface routing rule) and the actual XOR result. For example, determine whether the actual XOR result satisfies 01XX. If so, determine that the two routing rules are used together to determine the routing path. If it is not the first reference XOR result, it is necessary to determine whether it is the third target bit threshold. If so, it is determined to be on the same triangular prism surface. The corresponding routing path needs to be determined by the triangular prism surface routing rule and the relationship between the actual XOR results of the binary data corresponding to the source routing node and the target routing node. For example, determine whether the actual XOR result satisfies 00XX. If so, determine that a triangular prism surface routing rule is used to determine the routing path.
[0064] In some embodiments, determining a corresponding routing path according to the triangular prism side edge routing rule and the triangular prism surface routing rule and the relationship between the actual XOR results of the binary data corresponding to the source routing node and the target routing node includes: Performing a bitwise XOR operation on the binary data corresponding to the source routing node and the second target bit threshold to obtain a first XOR result; Routing the first XOR result as a source routing node along the side edge to a first source routing node on the same triangular prism surface as the target routing node; Routing the first source routing node to the target routing node according to the triangular prism routing rule; The path between the source routing node, the first source routing node and the target routing node is used as the routing path.
[0065] Specifically, the binary data corresponding to the source routing node is XORed with the second target bit threshold to obtain a first XOR result, and the first XOR result is used as the source routing node to be routed along the side edge to the first source routing node on the same triangular prism surface as the target routing node, that is, S new = S^0100 (second target bit number threshold). When the first source routing node and the target routing node are located on the same triangular prism surface, the first source routing node is routed to the target routing node according to the triangular prism surface routing rule.
[0066] In some embodiments, the third target bit number threshold includes a second reference XOR result and a third reference XOR result, the second reference XOR result is used to characterize that the binary data corresponding to the two routing nodes are the same; the third reference XOR result is used to characterize that the two routing nodes are directly connected; and the corresponding routing path is determined according to the triangular prism routing rule and the relationship between the actual XOR results of the binary data corresponding to the source routing node and the target routing node, including: Determine whether the actual XOR result is the second reference XOR result; If it is the second reference XOR result, the source routing node is determined to be the target routing node, and the routing ends; If it is not the second reference XOR result, determining whether the actual XOR result is the third reference XOR result; If it is the third reference XOR result, it is determined that the source routing node and the target routing node are directly connected, and the path corresponding to the source routing node to the target routing node is used as the final path.
[0067] Specifically, whether the actual XOR result is the second reference XOR result, such as the second reference XOR result is 0000, it means that the source routing node is the target routing node, and the routing is terminated. If not, it is determined whether the actual XOR result is the third reference XOR result, such as 0001, 0010, 0011, and it is determined that the source routing node and the target routing node are directly connected, and the triangular prism edge of the target routing node is directly taken as the final path.
[0068] For example, when S is 1010 and D is 0101: Step 1: S and D are bitwise XORed, and the result is recorded as ; Step 2: Determine the value of I: If the first digit of I is 1, then go to the third step; Step 3: Determine the routing path: The first step is to route to the triangular prism where D is located; after the first step of routing is completed, the current routing node is used as the new source routing node S new Go to step 4; S new =S^1000=1010^1000=0010; I=S new ^D=0010^0101=0111; Step 4: Determine the routing path: Determine the high two bits of I, , enter 4.1; 4.1 If In the first step, S needs to be routed along the side edge to the surface where D is located; after the first step of routing is completed, the current routing node is used as the new source routing node S new, and recalculate I and proceed to step 4.2; S new =S^0100=0010^0100=0110; I=S new ^D=0110^0101=0011; 4.2 If I is 0011, it means that S and D are on the same top or bottom surface of the same triangular prism. At this time, S and D are directly connected and routed directly through the connected line, and the routing ends; The routing path is: .
[0069] The path rules are as follows: Rule 1: All routing paths follow the shortest path; Rule 2: If the source routing node S is directly connected to the target routing node D, this routing request will not cause deadlock, so it can be routed directly through the connected line; Rule 3: If the source routing node S and the target routing node D, one belongs to the inner triangular prism and the other belongs to the outer triangular prism: if S belongs to the outer triangular prism and D belongs to the inner triangular prism, then the first step must be routed to the inner triangular prism where D is located; if D belongs to the inner triangular prism and S belongs to the outer triangular prism, then the first step must be routed to the outer triangular prism where S is located; Rule 4: If the source routing node S and the target routing node D belong to the same inner triangular prism or outer triangular prism: If the source routing node S and the target routing node D are not directly connected, it means that S and D belong to the top surface and the bottom surface respectively and are not connected by the same side rib, then the first step is to route S along the side rib to the surface where D is located; Rule 5: If the source routing node S and the target routing node D belong to the same inner triangular prism or outer triangular prism: If the source routing node S and the target routing node D are directly connected, it means that S and D belong to the same top surface\bottom surface or one belongs to the top surface and the other belongs to the bottom surface and are connected by the same side rib, then according to Rule 2, routing can be performed directly through the connected line.
[0070] Figure 7 A schematic diagram of a triangular prism ring structure with different layers provided by an embodiment of the present invention, such as Figure 7As shown, the application of rule 3 can avoid deadlock in the "ring" formed by the outer triangular prism and the inner triangular prism. We take the "ring" structure formed by the routing nodes 1101 and 1001 of the outer triangular prism and the routing nodes 0101 and 0001 of the inner triangular prism as an example. Assume that there are four routing requests: Request 1: routing node 0101 to routing node 1101; Request 2: routing node 1101 to routing node 0001; Request 3: routing node 1001 to routing node 0101; Request 4: routing node 0001 to routing node 1101; When these four routing requests need to pass through a routing node and all have occupied the middle routing node, no deadlock is formed.
[0071] Figure 8 A schematic diagram of an outer triangular prism ring structure provided by an embodiment of the present invention, such as Figure 8 As shown, the application of rule 4 can avoid deadlock in a triangular prism "ring". Take the "ring" structure composed of routing nodes 1100, 1101, 1001, and 1000 of the outer triangular prism as an example. Assume that there are four routing requests: Request 1: routing node 1100 to routing node 1001; Request 2: routing node 1101 to routing node 1000; Request 3: routing node 1001 to routing node 1100; Request 4: routing node 1000 to routing node 1101; When these four routing requests need to pass through a routing node and all have occupied the middle routing node, no deadlock is formed.
[0072] The judgment process of the actual XOR result and the first reference XOR result provided in this embodiment means that the corresponding routing rules and the actual XOR results in different triangular prism surfaces and the same triangular prism surface of the triangular prism network in the same layer determine the corresponding routing path, so that the accuracy of the determined routing path is improved and deadlock is avoided.
[0073] In some embodiments, routing the source routing node to a layer where the target routing node is located to obtain a new source routing node includes: Obtaining binary data and a reference XOR result of a source routing node, wherein the reference XOR result is an XOR result of binary data of any two routing nodes in a triangular prism network structure; Performing an XOR operation on the binary data of the source routing node and the reference XOR result to obtain a second source routing node in an adjacent layer in a direction in which the source routing node approaches the target routing node; Performing an XOR operation on the binary data of the second source routing node and the reference XOR result to obtain a third source routing node of an adjacent layer in a direction in which the second source routing node approaches the target routing node, until a new source routing node of the layer to which the target routing node belongs is obtained; Alternatively, the adjacent routing nodes of the source routing node are obtained based on the triangular prism network structure; Selecting a routing node in a different layer from the source routing node from the adjacent routing nodes as a fourth source routing node in an adjacent layer in a direction in which the source routing node approaches the target routing node; Based on the fourth source routing node, a corresponding adjacent routing node is acquired until a new source routing node of the layer to which the target routing node belongs is obtained.
[0074] Specifically, this embodiment considers two jump modes, one is to jump based on the routing algorithm, and the other is to jump based on the connection topology diagram of the triangular prism network result. The first routing algorithm jump considers that when the routing node is marked with binary data, it follows the XOR result of the binary data of any two routing nodes. Figure 5 Taking the routing node of binary data as an example, any two routing nodes are XORed to obtain 1000 (benchmark XOR result), so the binary data of the source routing node is XORed with the benchmark XOR result to obtain the second source routing node of the adjacent layer in the direction of the source routing node approaching the target routing node. The binary data of the second source routing node is XORed with the benchmark XOR result to obtain the third source routing node of the adjacent layer in the direction of the second source routing node approaching the target routing node, until a new source routing node of the layer to which the target routing node belongs is obtained. Since it is not only a two-layer triangular prism network structure, but also an N-layer triangular prism network structure with more than two layers, it is necessary to jump continuously until it is in the layer to which the target routing node belongs. The specific formula is: S1=S^1000, S is the source routing node, S1 is the new source routing node, and 1000 is the benchmark XOR result. The actual XOR result of the new source routing node and the target routing node is I=S1^D, and D is the target routing node.
[0075] Another way to jump is to jump based on the connection topology diagram of the triangular prism network result, and obtain the adjacent routing nodes of the source routing node based on the triangular prism network structure; select the routing nodes of different layers from the source routing node from the adjacent routing nodes as the fourth source routing node of the adjacent layer in the direction of the source routing node approaching the target routing node; obtain the corresponding adjacent routing nodes based on the fourth source routing node until a new source routing node of the layer to which the target routing node belongs is obtained. This method is based on the routing nodes adjacent to the source routing node and not belonging to the same layer as the new source routing node, searching layer by layer. In addition, it is also possible to jump to the source routing node of the layer to which the target routing node belongs based on the shortest path principle.
[0076] The jump method provided in this embodiment for routing a source routing node to a new source routing node of a layer to which a target routing node belongs improves the diversity and flexibility of the jump method.
[0077] In some embodiments, in order to avoid deadlock in multiple requests, when the source routing node and the target routing node are in the same layer, the method further includes: The corresponding routing path is determined according to the preset routing rules, the triangular prism side edge routing rules, the triangular prism surface routing rules and the relationship between the actual XOR results of the binary data corresponding to the source routing node and the target routing node; wherein the preset routing rules are determined by the shortest path rule, the threshold rule of the XOR threshold of the binary data of any two routing nodes and the multi-request link rule; the multi-request link rule is a link rule that allows a preset number of valid mark requests in the same direction of the communication link; the number of request links of the multi-link of the multi-request link rule is greater than the preset number, and the valid mark request is at the first hop or the second hop of the indirect connection relationship between the source routing node and the target routing node; the shortest path rule is that the shortest path between any two routing nodes is less than or equal to the network diameter of the triangular prism network structure.
[0078] Specifically, the preset routing rules are determined by the shortest path rule, the threshold rule of the XOR threshold of the binary data of any two routing nodes, and the multi-request link rule. Among them, the shortest path rule is set based on the network diameter as a reference, and the network diameter is the maximum value of the minimum distance between any two nodes in the network. That is to say, the network diameter of the single-layer triangular prism network structure is 2, the network diameter of the three-layer triangular prism network structure is 3, and the network diameter between each port node is at most the network diameter of the triangular prism network structure in which it is located. The shortest path rule is that in the process of determining the routing path, the shortest path through any two routing nodes is less than or equal to the network diameter of the triangular prism network structure. In the triangular prism network structure of the same layer, since the network diameter of the single-layer triangular prism network structure is 2, at most two hops are involved in the path between the source routing node and the target routing node, one is a hop directly connected to the source routing node and the target routing node, and the other is two hops indirectly connected to the source routing node and the target routing node: the first hop and the second hop.
[0079] The threshold rule of the XOR threshold is set for the XOR result of the binary data of each routing node of the triangular prism network structure. The XOR threshold is a preset position for the XOR result of any two routing nodes, including multiple XOR thresholds, such as 0011, etc. The XOR threshold here can be a certain threshold range, such as XX11, that is, the threshold of the last two digits is 11, which includes four specific thresholds of 0011, 0111, 1011, and 1111, or a specific threshold, 0011.
[0080] The multi-request link allows a preset number of valid tag requests in the same direction of the communication link. The preset number must be less than the number of request links, that is, to ensure that the valid tag requests in the same direction cannot occupy all the request links at the same time, that is, the number of request links of "1" is less than the number of all links. If all the request links in the same direction are valid tag requests, a deadlock phenomenon will occur, causing the network to paralyze. Taking two links as an example, there is at most one "1" valid tag request. In addition, "1" and "0", or "0" and "0" can exist at the same time. As long as "1" and "1" do not exist at the same time, under the multi-request link, the valid tag request is not limited to the first hop or the second hop where the source routing node and the target routing node are in an indirect connection relationship, and can be in any hop. In other words, it can exist in the first hop or in the second hop.
[0081] In some other embodiments, when the source routing node and the target routing node are at the same layer, the method further includes: The corresponding routing path is determined according to the preset routing rules, the triangular prism side edge routing rules, the triangular prism surface routing rules and the relationship between the actual XOR results of the binary data corresponding to the source routing node and the target routing node; wherein the preset routing rules are determined by the shortest path rule, the threshold rule of the XOR threshold of the binary data of any two routing nodes and the multi-path link rule; the multi-path link rule is a link rule that allows one valid marked path in the same direction of the communication link, and the valid marked path is the first hop of the indirect connection relationship between the source routing node and the target routing node; the shortest path rule is that the shortest path between any two routing nodes is less than or equal to the network diameter of the triangular prism network structure.
[0082] Specifically, for the multi-path link rule, it is a link rule that allows one valid marked path in the same direction of the communication link. The valid marked path is at the first hop in the indirect connection relationship between the source routing node and the target routing node, and its valid marked path is "+".
[0083] For the tag request, the path is randomly identified based on the different request tags under different paths. For example, there are 4 paths in total, A and B are in the same direction, C and D are in opposite directions. In the tag request, the path A is set to "1". After the current data transmission is completed, the path A can be set to "0" according to the next tag request. The tag request corresponding to the path is more flexible. If the path is marked, the corresponding path A is set to "+". No matter what kind of request is issued, it is necessary to strictly follow the situation where path A is "+".
[0084] This embodiment provides two marking methods. The shortest path rule realizes the shortest distance determination of the routing path, and the threshold rule of the XOR threshold simplifies the determination process through the XOR operation. The multi-link rule includes the multi-request link rule and the multi-path link rule. The multi-request link rule takes into account that there are two directional paths in the multi-request link between two routing nodes. Multiple links under each directional path correspond to multiple marking requests. When requesting a path, only a preset number of valid marking requests are allowed to pass, which avoids the corresponding deadlock scenario when all valid marking requests are passed when there are multiple links. In addition, the multi-request link rule based on the request mark can flexibly set the corresponding routing path, improve flexibility while avoiding deadlock, and the multi-path link rule enriches the diversity of path determination.
[0085] The above describes in detail various embodiments corresponding to the method for determining a routing path. On this basis, the present invention also discloses a device for determining a routing path corresponding to the method. Fig. 9 FIG. 1 is a structural diagram of a routing path determination device provided by an embodiment of the present invention. Fig. 9 As shown, the routing path determination device includes: The acquisition module 11 is used to construct a triangular prism network structure and obtain a source routing node and a target routing node under the triangular prism network structure; wherein each vertex of the triangular prism network structure corresponds to a routing node, and the number of layers is at least one layer; The first determination module 12 is used to determine the corresponding routing path according to the triangular prism side edge routing rule, the triangular prism surface routing rule and the relationship between the actual XOR results of the binary data corresponding to the source routing node and the target routing node when the source routing node and the target routing node are in the same layer; wherein the triangular prism side edge routing rule is a routing rule for routing the source routing node along the side edge corresponding to the source routing node to the triangular prism surface where the target routing node is located when the source routing node and the target routing node are not in the same triangular prism surface; the triangular prism surface routing rule is a routing rule for routing the source routing node along the triangular prism surface corresponding to the source routing node to the triangular prism edge where the target routing node is located when the source routing node and the target routing node are in the same triangular prism surface; the triangular prism surface includes the bottom surface and the top surface of the triangular prism; The second determination module 13 is used to route the source routing node to the layer where the target routing node is located to obtain a new source routing node when the source routing node and the target routing node are not in the same layer, and determine the corresponding routing path according to the triangular prism side edge routing rule, the triangular prism surface routing rule and the relationship between the actual XOR results of the binary data corresponding to the new source routing node and the target routing node.
[0086] Since the embodiments of the device part correspond to the above embodiments, please refer to the description of the embodiments of the method part for the embodiments of the device part, and will not be repeated here.
[0087] For an introduction to a routing path determination device provided by the present invention, please refer to the above method embodiment, and the present invention will not be repeated here. It has the same beneficial effects as the above routing path determination method.
[0088] Fig.10 A structural diagram of a routing path determination device provided by an embodiment of the present invention, such as Fig.10 As shown, the device comprises: A memory 21, used for storing computer programs; The processor 22 is used to implement the steps of the routing path determination method when executing a computer program.
[0089] Among them, the processor 22 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 22 may be implemented in at least one hardware form of a digital signal processor (DSP), a field-programmable gate array (FPGA), and a programmable logic array (PLA). The processor 22 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 22 may be integrated with a graphics processing unit (GPU), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 22 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.
[0090] The memory 21 may include one or more computer-readable storage media, which may be non-transitory. The memory 21 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 21 is at least used to store the following computer program 211, wherein, after the computer program is loaded and executed by the processor 22, the relevant steps of the routing path determination method disclosed in any of the aforementioned embodiments can be implemented. In addition, the resources stored in the memory 21 may also include an operating system 212 and data 213, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 212 may include Windows, Unix, Linux, etc. The data 213 may include, but is not limited to, data involved in the routing path determination method, etc.
[0091] In some embodiments, the routing path determination device may further include a display screen 23 , an input / output interface 24 , a communication interface 25 , a power supply 26 , and a communication bus 27 .
[0092] Those skilled in the art can understand that Fig.10 The structure shown in the figure does not constitute a limitation on the routing path determination device, and may include more or fewer components than those shown in the figure.
[0093] The processor 22 implements the routing path determination method provided by any of the above embodiments by calling the instructions stored in the memory 21 .
[0094] For an introduction to a routing path determination device provided by the present invention, please refer to the above method embodiment, and the present invention will not be repeated here. It has the same beneficial effects as the above routing path determination method.
[0095] Furthermore, the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by the processor 22, the steps of the above-mentioned routing path determination method are implemented.
[0096] It is understandable that if the method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium to execute all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.
[0097] For an introduction to a computer-readable storage medium provided by the present invention, please refer to the above method embodiment, which will not be described in detail herein. The present invention has the same beneficial effects as the above routing path determination method.
[0098] Furthermore, the present invention also provides a computer program product, including a computer program / instruction, which implements the steps of the routing path determination method when executed by a processor.
[0099] For an introduction to a computer program product provided by the present invention, please refer to the above method embodiment, which will not be described in detail herein. The computer program product has the same beneficial effects as the above routing path determination method.
[0100] In addition, each bit of binary data corresponding to each routing node is connected to a port node. To ensure the balance of port LANE, the port widths corresponding to each port node of a routing node are different. Fig.11 A schematic diagram of routing node coding, port numbering and corresponding width of an outer triangular prism network structure provided by an embodiment of the present invention, such as Fig.11 As shown, the routing node is represented by 4-bit binary data. Each bit of the binary data is connected to a port node. Corresponding to the number of the port node, the port width of a port node is also different. Fig.12 A schematic diagram of routing node coding, port numbering and corresponding width of an inner triangular prism network structure provided by an embodiment of the present invention, such as Fig.12 As shown, the routing node is represented by 4-bit binary data. Each bit of the binary data is connected to a port node. The port width of a port node is also different corresponding to the number of the port node. Fig.11 and Fig.12The two routing nodes in the corresponding virtual box share the same set of ports of the physical layer chip (Physical Layer, PHY). The network diameter between the routing nodes of the single-layer triangular prism network structure is 2, and the network diameter between the routing nodes of the double-layer triangular prism network structure is 3. If we only focus on the port nodes with a width of X16, Fig.13 A routing node distribution diagram of a port node X16 of a double-layer triangular prism network structure provided by an embodiment of the present invention, such as Fig.13 As shown, the network diameter between the routing nodes where it is located is 2. Compared with the current situation where the network diameter between the routing nodes where the ports of the flattened fat tree network width X16 are located is 4, the corresponding network diameter is reduced.
[0101] exist Fig.11 and Fig.12 As can be seen in the figure, the port widths corresponding to a group of PHYs include at least the widths of X16, X8, X4, and X2.
[0102] The multiple routing nodes provided in this embodiment share a group of PHYs, and the connection topology of the 8 port nodes sharing the same group of PHYs is optimized according to actual usage. After the optimization, the path length for mutual access between the X16 and X8 ports is shortened.
[0103] The above is a detailed introduction to a routing path determination method, device, medium and product provided by the present invention. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the scope of protection of the present invention.
[0104] It should also be noted that, in this specification, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises", "comprising" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
Claims
1. A method for determining a routing path, characterized in that: include: Constructing a triangular prism network structure, and obtaining a source routing node and a target routing node under the triangular prism network structure; wherein each vertex of the triangular prism network structure corresponds to a routing node, and the number of layers is at least one layer; When the source routing node and the target routing node are in the same layer, the corresponding routing path is determined according to the triangular prism side edge routing rule, the triangular prism surface routing rule and the relationship between the actual XOR results of the binary data corresponding to the source routing node and the target routing node; wherein the triangular prism side edge routing rule is a routing rule for routing the source routing node along the side edge corresponding to the source routing node to the triangular prism surface where the target routing node is located when the source routing node and the target routing node are not in the same triangular prism surface; the triangular prism surface routing rule is a routing rule for routing the source routing node along the triangular prism surface corresponding to the source routing node to the triangular prism edge where the target routing node is located when the source routing node and the target routing node are in the same triangular prism surface; the triangular prism surface includes the bottom surface and the top surface of the triangular prism; When the source routing node and the target routing node are not in the same layer, the source routing node is routed to the layer where the target routing node is located to obtain a new source routing node, and the corresponding routing path is determined according to the triangular prism side edge routing rule, the triangular prism surface routing rule and the relationship between the actual XOR results of the binary data corresponding to the new source routing node and the target routing node.
2. The method for determining a routing path according to claim 1, wherein: In the case of a multi-layer triangular prism network, the triangular prism networks of each layer are nested structures; The binary data of each routing node of the triangular prism network structure includes a hierarchical relationship for characterizing the triangular prism network; the target number of bits of binary data corresponding to the hierarchical relationship of each layer is the same; and the process of determining the target number of bits includes: Obtain the initial target number of bits of binary data of each routing node; The initial target number of digits is raised to a power of 2 to obtain a critical number of layers; If the critical number of layers is less than the target number of layers of the triangular prism network structure, then add 1 to the initial target number of layers to obtain the first target number of layers, take the first target number of layers as the new initial target number of layers, and return to the step of raising the target number of layers to the power of 2 to obtain the critical number of layers, until the obtained critical number of layers is equal to or greater than the target number of layers of the triangular prism network structure, and take the first target number of layers as the target number of layers corresponding to the target number of layers.
3. The method for determining a routing path according to claim 2, wherein: The XOR result of the binary data of each routing node on the same side edge of the triangular prism network corresponding to the same layer under the triangular prism network structure is the second target bit threshold; The XOR result of the binary data of each routing node on the same triangular prism surface of the triangular prism network corresponding to the same layer under the triangular prism network structure is the third target bit number threshold.
4. The method for determining a routing path according to claim 2, wherein: The process of determining that the source routing node and the target routing node are at the same layer includes: Obtain binary data corresponding to the source routing node and the target routing node respectively; Perform bitwise XOR operation on the binary data corresponding to the source routing node and the target routing node to obtain the actual XOR result; If the target number of bits of the actual XOR result is the first target number of bits threshold, it is determined that the source routing node and the target routing node are not in the same layer; If the target number of bits of the actual XOR result is the second target number of bits threshold, it is determined that the source routing node and the target routing node are in the same layer; wherein the first target number of bits threshold and the second target number of bits threshold are different.
5. The method for determining a routing path according to claim 3, characterized in that: If the triangular prism network structure has two layers, the highest bit of the binary data of the routing nodes of the outer triangular prism network structure is 1, and the highest bit of the binary data of the routing nodes of the inner triangular prism network structure is 0.
6. The method for determining a routing path according to claim 5, characterized in that: Determine the corresponding routing path according to the triangular prism side edge routing rule, the triangular prism surface routing rule, and the relationship between the actual XOR results of the binary data corresponding to the source routing node and the target routing node, including: Determine whether the actual XOR result is the first reference XOR result; If it is the first reference XOR result, determining that the source routing node and the target routing node are on different triangular prism surfaces of the triangular prism network of the same layer, and determining the corresponding routing path according to the relationship between the triangular prism side edge routing rule and the triangular prism surface routing rule and the actual XOR result of the binary data corresponding to the source routing node and the target routing node; If it is not the first reference XOR result, determining whether the actual XOR result is a third target bit number threshold; If it is the third target bit number threshold, it is determined that the source routing node and the target routing node are on the same triangular prism surface of the triangular prism network of the same layer, and the corresponding routing path is determined according to the triangular prism surface routing rule and the relationship between the actual XOR results of the binary data corresponding to the source routing node and the target routing node.
7. The method for determining a routing path according to claim 6, characterized in that: Determining a corresponding routing path according to the triangular prism side edge routing rule and the triangular prism surface routing rule and the relationship between the actual XOR results of the binary data corresponding to the source routing node and the target routing node includes: Performing a bitwise XOR operation on the binary data corresponding to the source routing node and the second target bit threshold to obtain a first XOR result; Routing the first XOR result as a source routing node along a side edge to a first source routing node on the same triangular prism surface as the target routing node; Routing the first source routing node to the target routing node according to a triangular prism routing rule; The path between the source routing node, the first source routing node and the target routing node is used as the routing path.
8. The method for determining a routing path according to claim 6 or 7, characterized in that: The third target bit number threshold includes a second reference XOR result and a third reference XOR result, wherein the second reference XOR result is used to indicate that the binary data corresponding to the two routing nodes are the same; and the third reference XOR result is used to indicate that the two routing nodes are directly connected. Determining a corresponding routing path according to the triangular prism routing rule and the relationship between the actual XOR results of the binary data corresponding to the source routing node and the target routing node includes: Determine whether the actual XOR result is the second reference XOR result; If it is the second reference XOR result, the source routing node is determined to be the target routing node, and the routing ends; If it is not the second reference XOR result, determining whether the actual XOR result is the third reference XOR result; If it is the third reference XOR result, it is determined that the source routing node and the target routing node are directly connected, and the path corresponding to the source routing node to the target routing node is used as the final path.
9. The method for determining a routing path according to claim 1, characterized in that: Routing the source routing node to the layer where the target routing node is located to obtain a new source routing node, including: Obtaining binary data and a reference XOR result of a source routing node, wherein the reference XOR result is an XOR result of binary data of any two routing nodes in a triangular prism network structure; Performing an XOR operation on the binary data of the source routing node and the reference XOR result to obtain a second source routing node in an adjacent layer in a direction in which the source routing node approaches the target routing node; Performing an XOR operation on the binary data of the second source routing node and the reference XOR result to obtain a third source routing node of an adjacent layer in a direction in which the second source routing node approaches the target routing node, until a new source routing node of the layer to which the target routing node belongs is obtained; Alternatively, the adjacent routing nodes of the source routing node are obtained based on the triangular prism network structure; Selecting a routing node in a different layer from the source routing node from the adjacent routing nodes as a fourth source routing node in an adjacent layer in a direction in which the source routing node approaches the target routing node; Based on the fourth source routing node, a corresponding adjacent routing node is acquired until a new source routing node of the layer to which the target routing node belongs is obtained.
10. The method for determining a routing path according to claim 1, characterized in that: The process of determining the binary data corresponding to a routing node includes: Get the binary data corresponding to each bit; Select bits greater than the total number of routing nodes from the number of binary data corresponding to each bit as initial bits; Determine, within the initial bits, an initial bit closest to the total number of routing nodes as a target bit; The binary data of the target bit is determined according to the target bit to determine the binary data corresponding to the routing node.
11. The method for determining a routing path according to claim 1, wherein: When the source routing node and the target routing node are at the same layer, the method further includes: The corresponding routing path is determined according to the preset routing rules, the triangular prism side edge routing rules, the triangular prism surface routing rules and the relationship between the actual XOR results of the binary data corresponding to the source routing node and the target routing node; wherein the preset routing rules are determined by the shortest path rule, the threshold rule of the XOR threshold of the binary data of any two routing nodes and the multi-request link rule; the multi-request link rule is a link rule that allows a preset number of valid mark requests in the same direction of the communication link; the number of request links of the multi-link of the multi-request link rule is greater than the preset number, and the valid mark request is at the first hop or the second hop of the indirect connection relationship between the source routing node and the target routing node; the shortest path rule is that the shortest path between any two routing nodes is less than or equal to the network diameter of the triangular prism network structure.
12. The method for determining a routing path according to claim 1, characterized in that: When the source routing node and the target routing node are at the same layer, the method further includes: The corresponding routing path is determined according to the preset routing rules, the triangular prism side edge routing rules, the triangular prism surface routing rules and the relationship between the actual XOR results of the binary data corresponding to the source routing node and the target routing node; wherein the preset routing rules are determined by the shortest path rule, the threshold rule of the XOR threshold of the binary data of any two routing nodes and the multi-path link rule; the multi-path link rule is a link rule that allows one valid marked path in the same direction of the communication link, and the valid marked path is the first hop of the indirect connection relationship between the source routing node and the target routing node; the shortest path rule is that the shortest path between any two routing nodes is less than or equal to the network diameter of the triangular prism network structure.
13. A routing path determination device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the routing path determination method according to any one of claims 1 to 12 when executing the computer program.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the routing path determination method according to any one of claims 1 to 12 are implemented.
15. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the steps of the routing path determination method according to any one of claims 1 to 12 are implemented.
Citation Information
Patent Citations
Routing path planning method, device, equipment and medium
CN118282927A
Data transmission method and device, computer equipment and storage medium
CN118612136A
Network-on-chip communication method and device, computer equipment and storage medium
CN118714019A
Non-minimum cost forwarding for packet-switched networks
WO2016039758A1
Cited By
Construction method of network topology structure, data transmission method, electronic equipment and computer program product
CN119583353A
Method for constructing network topology structure, data transmission method, electronic device, and computer program product
CN119583353B
Construction method of network topology structure, data transmission method, electronic equipment and computer program product
CN119583431A
Method for constructing network topology structure, data transmission method, electronic device, and computer program product
CN119583431B
