Routing path determination method and device, equipment and storage medium
By grading and selecting the best output channel, the problem of inability to effectively balance traffic load in the prior art is solved, and the transmission performance of the network is improved.
Patent Information
- Application Number
- CN202411035489.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2024-12-13
AI Technical Summary
The prior art is unable to effectively balance the traffic load of on-chip interconnect networks, resulting in network blockage and performance degradation.
By obtaining the second adjacent node that is two hops away from the current routing node, scoring its available output channel, selecting the channel with the highest channel score as the output path, considering the channel availability, blockage degree and global congestion.
It effectively improves the transmission performance of the network, selects a smooth and available output channel, and solves the problem of uneven traffic load.
Smart Images

Figure CN119135589A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data transmission, and in particular to a method, device, equipment and storage medium for determining a routing path. Background Art
[0002] In modern computing systems, on-chip interconnect networks are key components for efficient information exchange between different computing cores. Traditional on-chip interconnect output selection strategies, such as the forgetful output selection strategy, the random selection strategy, the dimensional order output selection strategy, and the zigzag output selection strategy, have improved the efficiency of information exchange to a certain extent, but they all have a common problem: they cannot effectively balance the traffic load on the network, resulting in network congestion and overall performance degradation.
[0003] The forgetful output selection strategy is simple and direct. It does not consider the network status and exchanges information from the designated channel each time. This method cannot effectively balance the traffic load when facing time-varying and non-uniform traffic patterns. The random selection strategy randomly selects an output channel from the candidate channels through a random function, and reselects if a blocked channel is encountered. This method increases a certain degree of flexibility, but still cannot fundamentally solve the problem of uneven traffic load. Although the dimensional order output selection strategy and the zigzag output selection strategy try to reduce blocking by selecting the output channel with the lowest dimension or maximizing the number of remaining paths to the destination, they also fail to effectively balance network traffic, especially under high load conditions, and network performance will still be seriously affected. Summary of the invention
[0004] The purpose of the embodiments of the present invention is to provide a method, device, equipment and storage medium for determining a routing path, so as to solve the problem that the prior art cannot effectively balance network traffic, reduce the traffic load of information interaction, and thus cannot improve network interaction efficiency. The specific technical solution is as follows:
[0005] According to a first aspect of an embodiment of the present invention, a method for determining a routing path is provided, the method comprising:
[0006] In response to a data transmission request sent by a current routing node, obtaining a secondary adjacent node two hops away from the current routing node;
[0007] Acquire the first available output channel quantity of the secondary adjacent nodes, and select a target secondary adjacent node from each of the secondary adjacent nodes according to the first available output channel quantity;
[0008] Scoring a plurality of first available output channels of the target secondary adjacent node to obtain a channel score of each first available output channel;
[0009] The first available output channel with the largest channel score is used as the target available output channel, and the target available output channel is used as the output path of the current routing node.
[0010] Optionally, the acquiring the first available output channel number of the secondary adjacent nodes and selecting a target secondary adjacent node from each of the secondary adjacent nodes according to the first available output channel number includes:
[0011] Acquire the network topology structure of the secondary neighboring node, and calculate the number of first available output channels of the secondary neighboring node by combining the network topology structure with a shortest path algorithm;
[0012] A maximum value is obtained from each of the first available output channel quantities, and a secondary adjacent node corresponding to the maximum value is used as the target secondary adjacent node.
[0013] Optionally, scoring a plurality of first available output channels of the target secondary adjacent node to obtain a channel score of each first available output channel includes:
[0014] Obtaining the number of available paths, switch switching blocking parameters, channel blocking parameters, and a global congestion score of the first available output channel;
[0015] According to a preset scoring formula, the number of available paths, the switch switching blocking parameter, the channel blocking parameter and the global blocking score are added to calculate a channel score of the first available output channel.
[0016] Optionally, there is a buffer for data transmission between routing nodes, and the obtaining of the switch switching blocking parameter of the first available output channel includes:
[0017] Obtaining an average input rate and an average output rate of the buffer;
[0018] If the average input rate is greater than the average output rate, setting the switch switching blocking parameter to a first preset parameter value;
[0019] If the average input rate is less than or equal to the average output rate, the switch switching blocking parameter is set to a second preset parameter value.
[0020] Optionally, the path of the buffer includes a plurality of buffer slots, and the acquiring the channel blocking parameter of the first available output channel includes:
[0021] Obtain the total number and occupied number of buffer slots in the buffer;
[0022] Calculate the free number of the buffer slots based on the total number and the occupied number;
[0023] Get the channel blocking parameter corresponding to the idle quantity.
[0024] Optionally, obtaining a global blocking score of the first available output channel includes:
[0025] Obtaining a network topology structure of the current routing node and a destination routing node for sending data, and dividing the network topology structure into four regions: northeast, southeast, southwest, and northwest, with the current routing node as the origin;
[0026] Determining a location of the destination routing node based on the location coordinates of the destination routing node;
[0027] If the region is northeast, determining that the first channel through which the current routing node sends data to the destination routing node is an eastbound channel, and the second channel is a northbound channel;
[0028] If the location is southeast, the first channel is determined to be an eastward channel, and the second channel is determined to be a southward channel;
[0029] If the area is southwest, the first channel is determined to be a westward channel, and the second channel is determined to be a southward channel;
[0030] If the area is northwest, the first channel is determined to be a westward channel, and the second channel is determined to be a northward channel;
[0031] Obtaining a flow control unit transmission value of the first channel and a flow control unit transmission value of the second channel;
[0032] Taking the channel with the smaller transmission value of the flow control unit as the target subchannel;
[0033] Based on the target subchannel corresponding to the first available output channel, acquiring the sum of flow control unit transmission values corresponding to the first available output channel;
[0034] A global congestion score of the first available output channel is calculated based on the sum of the flow control unit transmission values.
[0035] Optionally, before acquiring a secondary adjacent node two hops away from the current routing node, the method further includes:
[0036] Obtaining the number of second available output channels of the current routing node;
[0037] If the number of the second available output channels is less than or equal to the first channel threshold, using the second available output channel of the current routing node as the output path of the current routing node;
[0038] If the number of the second available output channels is greater than the first channel threshold, a secondary adjacent node two hops away from the current routing node is obtained.
[0039] According to a second aspect of an embodiment of the present invention, a routing path determination device is provided, the device comprising:
[0040] A secondary adjacent node acquisition module, configured to respond to a data transmission request sent by a current routing node and acquire a secondary adjacent node two hops away from the current routing node;
[0041] A target secondary adjacent node determination module is used to obtain the first available output channel quantity of the secondary adjacent nodes, and select a target secondary adjacent node from each of the secondary adjacent nodes according to the first available output channel quantity;
[0042] A channel score calculation module, used to score a plurality of first available output channels of the target secondary adjacent node to obtain a channel score of each first available output channel;
[0043] The output path determination module is used to use the first available output channel with the largest channel score as a target available output channel, and use the target available output channel as the output path of the current routing node.
[0044] According to a third aspect of an embodiment of the present invention, there is provided an electronic device, including:
[0045] One or more processors; a memory; one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute any of the routing path determination methods described in the first aspect.
[0046] According to a fourth aspect of an embodiment of the present invention, a non-volatile readable storage medium is provided. When instructions in the non-volatile readable storage medium are executed by a processor of an electronic device, the electronic device can execute the routing path determination method as described in any one of the first aspects.
[0047] The technical solution provided by the embodiment of the present invention may have the following beneficial effects:
[0048] The method for determining a routing path disclosed in an embodiment of the present invention obtains a secondary neighboring node two hops away from the current routing node in response to a data sending request sent by the current routing node; obtains the number of first available output channels of the secondary neighboring node, and selects a target secondary neighboring node from each secondary neighboring node according to the number of first available output channels; scores several first available output channels of the target secondary neighboring node to obtain a channel score of each first available output channel; takes the first available output channel with the largest channel score as the target available output channel, and takes the target available output channel as the output path of the current routing node. The embodiment of the present invention obtains a secondary neighboring node two hops away from the current routing node, determines the target secondary neighboring node according to the number of first available output channels connected to the secondary neighboring node, scores several first available output channels of the target secondary neighboring node in turn, determines the output path of the current routing node according to the maximum score, scores the path availability, channel blocking degree, switch switching blocking degree and congestion degree of the target node based on the target node, selects the best information interaction channel, and selects a smooth and available output channel in consideration of the traffic load of each channel, thereby effectively improving the transmission performance of the network. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of 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 creative work.
[0050] Figure 1 is a flowchart of a method for determining a routing path provided by an embodiment of the present invention;
[0051] Figure 2 It is a schematic diagram of channel blocking and switch switching blocking of a buffer in a routing path determination method provided by an embodiment of the present invention;
[0052] Figure 3 It is a schematic diagram of network area division in a method for determining a routing path provided by an embodiment of the present invention;
[0053] Figure 4 is a schematic diagram of a register in a routing path determination method provided by an embodiment of the present invention;
[0054] Figure 5 is a schematic diagram of an exemplary channel scoring in a routing path determination method provided by an embodiment of the present invention;
[0055] Figure 6is a schematic diagram of an exemplary calculation unit in a routing path determination method provided by an embodiment of the present invention;
[0056] Figure 7 is a schematic diagram of an exemplary routing structure in a routing path determination method provided by an embodiment of the present invention;
[0057] Figure 8 is a schematic structural diagram of an exemplary router in a method for determining a routing path provided by an embodiment of the present invention;
[0058] Fig. 9 is a schematic diagram of an exemplary strategy selection in a routing path determination method provided by an embodiment of the present invention;
[0059] Fig.10 is a structural block diagram of a routing path determination device provided by an embodiment of the present invention;
[0060] Fig.11 It is a block diagram of an electronic device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0061] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0062] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, some technical features involved in the embodiments of the present invention are explained and illustrated below:
[0063] On-Chip Interconnection is an important concept in integrated circuit design. It refers to the efficient connection and communication between various components (such as processor core, memory, input and output interface, etc.) within a single chip. With the continuous development of semiconductor processes and integrated circuit technology, the number of transistors integrated on a single chip is increasing, and the functions are becoming more and more complex. On-Chip Interconnection technology directly affects the performance, power consumption and cost of the chip, and its importance is becoming increasingly prominent.
[0064] NoC (Network-on-Chip) is an architecture for on-chip communication. It connects the various functional modules inside the chip (such as processor core, memory controller, dedicated hardware accelerator, etc.) through a topology similar to a computer network, and realizes data transmission between modules through routers and links.
[0065] Network topology refers to the physical layout that uses transmission media to connect various devices such as computers. It refers to the geometric shape formed during the interconnection process. It can represent the network configuration of network servers and workstations and the connections between them.
[0066] Routing refers to the process of determining the transmission path of a data packet from the source node to the destination node. Routing is one of the core functions of network communication, which ensures that data can be transmitted efficiently and reliably in the network. The implementation of routing involves key components such as routing algorithms, routing tables, and routers.
[0067] Routing Node, also known as communication node according to the introduction of computer communication, is a key component in the on-chip interconnect network, responsible for receiving, processing and forwarding data packets between different computing cores or processing units.
[0068] Routing algorithms are the rules and policies that determine the transmission path of data packets. Common routing algorithms include: static routing, dynamic routing, distance vector routing algorithms (such as RIP), link state routing algorithms (such as OSPF), and adaptive routing.
[0069] The Flow Control Unit (FCU) is an important component in a computer network or on-chip interconnect network. It is responsible for managing and regulating the transmission of data flows in the network to ensure the effective use of network resources, avoid or reduce network congestion, and ensure the reliability and efficiency of data transmission.
[0070] A buffer is an area allocated in memory for temporary storage of data for use in data transmission between a data source and a data destination. In an on-chip interconnect network or computer network, buffers also exist between routing nodes. These buffers are usually located at the input and output ports of routing nodes and are used to temporarily store data packets being transmitted.
[0071] A buffer slot is a basic unit in a buffer, which refers to the space in the buffer used to store a single data item (such as a packet, frame, byte, etc.). In a computer network or on-chip interconnect network, a buffer slot usually refers to a location in the input port or output port buffer of a routing node, which is used to temporarily store data packets being transmitted.
[0072] Output Channel refers to the path or port through which data packets are sent from a routing node or switch to the next network node in a computer network or on-chip interconnect network. Available Output Channel refers to the output port or path that a routing node or switch can use to forward data packets at a certain moment.
[0073] In one example, the on-chip interconnect network is a key component for achieving efficient information interaction between different computing cores. The traditional on-chip interconnect output selection strategy currently used is mainly an unconscious perception selection method, which does not consider the overall state of the current network, such as the forgotten output selection strategy, the random selection strategy, the dimensional order output selection strategy, and the zigzag output selection strategy. Although it improves the efficiency of information interaction to a certain extent, it cannot effectively balance the traffic load on the network, resulting in network congestion and a decline in overall performance.
[0074] In this regard, in an embodiment of the present invention, network balancing is performed on the network topology structure where the current routing node is located, and a number of available output channels are obtained by acquiring the secondary adjacent nodes that are two hops away from the current routing node. The available output channels are scored in turn, and the output path of the current routing node is confirmed based on the obtained channel scores. By evaluating the channel congestion, the optimal output path for the routing node to transmit data is selected, thereby improving the transmission efficiency of the network.
[0075] Reference Figure 1 , shows a flowchart of a method for determining a routing path provided by an embodiment of the present invention, which may specifically include the following steps:
[0076] S101, in response to a data sending request sent by a current routing node, obtaining a secondary adjacent node that is two hops away from the current routing node.
[0077] In an embodiment of the present invention, when the current routing node issues a data sending request, a secondary adjacent node two hops away from the current routing node can be obtained as an intermediate node for data output, and the output path of the current routing node can be further determined based on the secondary adjacent node.
[0078] Specifically, the topology of the network can be obtained, and the positions of all nodes and the connection relationships between the nodes can be extracted based on the network topology. The acquisition of routing nodes is usually achieved through a network topology database or a routing table. Exemplarily, after obtaining the network topology, the one-hop neighbor node directly connected to the current node can be found according to the network topology information, and for each one-hop neighbor node, the node directly connected to the one-hop neighbor node can be found, that is, the secondary neighbor node two hops away from the current node. The information of the identified secondary neighbor node is returned to the current routing node for subsequent routing decisions or data sending operations.
[0079] S102, obtaining the first available output channel quantity of the secondary adjacent nodes, and selecting a target secondary adjacent node from each secondary adjacent node according to the first available output channel quantity.
[0080] Based on the recognition result of the network topology structure, the present invention can obtain several secondary adjacent nodes that are two hops away from the current routing node. For each secondary adjacent node, the state of the output channel connected to the secondary critical node can be monitored. Exemplarily, the state of the output channel can include whether the channel is available, and the availability of the channel is characterized by no congestion or failure of the channel. For each secondary adjacent node, there are several first available output channels, the number of the first available output channels of the secondary adjacent nodes is counted, and a target secondary adjacent node is selected from the secondary adjacent nodes according to the number of the first available output channels.
[0081] Specifically, the number of first available output channels of the secondary adjacent nodes can be obtained based on the network topology and routing algorithm, wherein the network topology describes the connection mode and relationship between each node in the network, and different topologies (such as star, bus, ring, tree, mesh, etc.) have different characteristics and application scenarios. The connection mode between the nodes can be confirmed based on the network topology. Furthermore, by checking the network interface and link status of the secondary adjacent node, the available output channels are confirmed and the number of first available output channels of the secondary adjacent node is calculated. Preferably, the embodiment of the present invention combines the shortest path algorithm to count the first available output channels, and the obtained first available output channel is the shortest output path from the secondary adjacent node to the destination routing node, and the number of first available output channels of each secondary adjacent node is obtained according to the result of the shortest path algorithm. The shortest path algorithm can adopt the Dijkstra algorithm, the Bellman-Ford algorithm, etc., which will not be repeated here.
[0082] After obtaining the first available output channel quantity corresponding to each secondary adjacent node, each first available output channel quantity is compared, a maximum value is obtained from each first available output channel quantity, and the secondary adjacent node having the maximum value is used as the target secondary adjacent node.
[0083] S103 , scoring a plurality of first available output channels of the target secondary adjacent node to obtain a channel score of each first available output channel.
[0084] Each secondary neighboring node is connected to a number of first available output channels. To determine the best output path of the current routing node, the first available output channels of the target secondary neighboring node may be scored in turn based on a preset scoring formula to obtain a channel score of each first available output channel. Exemplarily, the preset scoring formula is based on the number of available paths, channel blocking parameters, switch switching blocking parameters, and global congestion scores. The preset scoring formula may be as follows:
[0085] Score=Path_Availability+Free_Slots+Intensity+DCA_Score (1)
[0086] Among them, Score is the channel score, Path_Availability represents the number of first available output channels of the secondary adjacent node to which the current output channel belongs, reflecting the path availability of the current output channel. For output channels belonging to the same target secondary adjacent node, the number of available paths is the same, Free_Slots reflects the congestion level of the current output channel, Intensity reflects the congestion level of the switch, and DCA_Score represents the total number of data flows sent by the current output channel, reflecting the congestion level of the current output channel and its surrounding channels.
[0087] S104: Use the first available output channel with the largest channel score as a target available output channel, and use the target available output channel as an output path of the current routing node.
[0088] Based on the channel score of each first available output channel, through score comparison, the first available output channel with the largest channel score is used as the target available output channel, that is, the output path of the current routing node.
[0089] The embodiment of the present invention obtains a secondary neighboring node two hops away from the current routing node, determines a target secondary neighboring node according to the number of first available output channels connected to the secondary neighboring node, scores several first available output channels of the target secondary neighboring node in turn, and determines the output path of the current routing node according to the maximum score value, wherein the path availability, channel blocking degree, switch switching blocking degree and congestion degree of the target node are scored based on a preset scoring formula, and the available output channel of the target secondary neighboring node with the largest number of available output channels (Path_Availability), the lowest channel blocking degree (Free_Slots), the lowest switch switching blocking degree (Intensity) and the highest DCA score is selected as the best information interaction channel, and under the condition of considering the traffic load of each channel, a smooth and available output channel is selected to effectively improve the transmission performance of the network.
[0090] In the embodiment of the present invention, there is a buffer zone for data transmission between routing nodes. Figure 2 , showing a schematic diagram of channel blocking and switch switching blocking of a buffer in a routing path determination method provided by an embodiment of the present invention, wherein a router is taken as a specific device embodiment of a routing node, and a buffer is usually added between router 1 and router 2 to store data transmitted between the routers. During the data transmission process, two types of blocking will occur: channel blocking and switch switching blocking. By evaluating the channel blocking and switch switching blocking of the available output channel, the blocking status of the available output channel can be obtained.
[0091] In a possible implementation manner, the switch switching blocking parameter of the first available output channel may be obtained by the following steps:
[0092] Obtaining an average input rate and an average output rate of the buffer;
[0093] If the average input rate is greater than the average output rate, setting the switch switching blocking parameter to a first preset parameter value;
[0094] If the average input rate is less than or equal to the average output rate, the switch switching blocking parameter is set to a second preset parameter value.
[0095] In the embodiment of the present invention, when data reaches the destination routing node through the buffer, a switch switching blockage will occur, such as Figure 2 As shown in the middle right half, the congestion level of the switch when switching different port switches can be reflected by the router service time. The router service time is composed of routing time and arbitration time, as shown in the following formula:
[0096] CL Switch=T RouterService =T Routing +T Arbitration (2)
[0097] Among them, CL Switch Indicates the congestion level of the switch when switching different ports. RouterService Characterizes the router service time, T Routing Characterize the routing time, T Arbitration Characterizes arbitration time.
[0098] In one example, when all routers in the network topology adopt the same router architecture, the routing time (T Routing ) is constant. When there is no contention for access to the same output port between the input ports of the switch, the arbitration duration is zero. At this time, the congestion level of the switch can be reflected by the routing time. When there is contention for access to the same output port between the input ports, the arbitration time is not zero, and the service time of the router will increase by the duration of a flow control unit leaving the input buffer. At this time, the average output rate (AR) of the router input buffer can be used to reflect the congestion level of the switch. Out ) is expressed as follows:
[0099] CL Switch =T RouterService =AR Out (3)
[0100] The average output rate of the input buffer can be obtained by calculating the average duration between two consecutive output flow control units. For example, the duration of the output flow control unit in the previous cycle is set to ΔT out1 , set the duration of the flow control unit output in the current cycle to ΔT out2 , then the average output rate AR Out It can be calculated by the following formula:
[0101]
[0102] Furthermore, the embodiment of the present invention introduces a switch switching blocking parameter for detecting the degree of switch blocking in the current output channel, and sets the switch switching blocking parameter based on the input rate of the input buffer and the output rate after the input buffer, wherein the average input rate of the buffer is obtained based on the average duration between two consecutive input flow control units, and illustratively, the duration of the flow control unit input in the previous cycle is set to ΔT in1 , set the duration of the flow control unit output in the current cycle to ΔT in2 , then the average input rateAverage(ΔTin ) can be calculated by the following formula:
[0103]
[0104] Referring to the above, the average output rate AR Out Also recorded as Average(ΔT out ), the average input rateAverage(ΔT in ) and the average output rateAverage(ΔT out ), when the average input rate is greater than the average output rate, the switch switching blocking parameter is set to the first preset parameter value; when the average input rate is less than or equal to the average output rate, the switch switching blocking parameter is set to the second preset parameter value. Preferably, the first preset parameter value can be set to 0, and the second preset parameter value can be set to 1, then the value of the switch switching blocking parameter is 0 or 1. By introducing the switch switching blocking parameter, the comparison result of the average input rate and the average output rate in the buffer is concisely reflected, and the degree of switch switching blocking when data is transmitted from the current output channel is reflected.
[0105] It should be noted that the values of the first preset parameter value and the second preset parameter value can be set according to actual needs, and the present invention is not limited to this.
[0106] The path of the buffer between the routers includes a plurality of buffer slots. The buffer slots are used as storage units to store data transmitted between the routers. The occupancy of the buffer slots can reflect the degree of blocking of the current output channel. Exemplarily, the channel blocking parameter of the first available output channel can be obtained by the following steps:
[0107] Get the total number and occupied number of buffer slots in the buffer;
[0108] Calculate the number of free buffer slots based on the total number and the occupied number;
[0109] Get the channel blocking parameters corresponding to the idle quantity.
[0110] Specifically, when the space in the input buffer is occupied, the input buffer cannot continue to accommodate newly arrived data packets, and channel congestion occurs. Channel congestion is reflected by two main delay times: buffer transmission time (T Transfer ) and buffer shift time (T Shift ), where the buffer transmission time (T Transfer ) is a constant time, representing the time taken by a flow control unit to transfer from the output port of the upstream router to the empty buffer of the downstream router. The buffer shift time (T Shift) is the duration of an incoming header as it drifts toward the top of the buffer, then the channel (CL Channel ) can be expressed as:
[0111] CL Channel =T Transfer +T Shift (6)
[0112] In one example, when all routers in the network topology are of the same structure and each router has the same buffer architecture, the buffer transmission time (T Transfer ) remains unchanged, at this time, the buffer shift time (T Shift ) reflects the congestion level of the channel, while the buffer shift time (T Shift ) depends on the number of occupied buffer slots in the input buffer (n Occupy ) and the router's service time for each buffer slot (T BufferService ), the congestion degree of the channel can be expressed as:
[0113] CL Channel = T Shift = n Occupy × T BufferService (7)
[0114] The service time of each buffer slot processed by the router can be determined by the routing time and arbitration time. When all routers have the same architecture, there is no competition for the same output port. At this time, the service time of the router is a constant time. The congestion degree of the channel can be determined by the number of occupied buffer slots in the input buffer (n Occupy )reflect.
[0115] After obtaining the total number and occupied number of buffer slots in the input buffer, the free number of buffer slots can be obtained by subtracting them, and the channel blocking parameter corresponding to the free number can be further obtained. Preferably, the more free number of buffer slots, the lower the corresponding channel blocking parameter. The channel blocking parameter can be determined by presetting the corresponding relationship between the free number and the channel blocking parameter.
[0116] In the embodiment of the present invention, a global congestion awareness solution based on the destination routing node is introduced, and a corresponding global congestion score is assigned to each available output channel, such as Figure 3As shown, a schematic diagram of network area division in a routing path determination method provided by an embodiment of the present invention is shown. After obtaining the network topology structure and the destination routing node, the network topology structure is divided into four areas of northeast, southeast, southwest and northwest with the current routing node as the origin. In the divided network topology structure, the corresponding position coordinates of each routing node can be determined based on the distance and direction relative to the origin. After obtaining the destination routing node, the corresponding position coordinates can be obtained, and the area where the destination routing node is located can be determined.
[0117] After confirming the area where the destination routing node is located, the two transmission channels in different directions through which the current routing node sends data to the destination routing node can be determined. For example, if the area where the destination routing node is located is the northeast, then the first channel through which the current routing node sends data to the destination routing node can be determined to be the eastbound channel, and the second channel is the northbound channel. Similarly, if the area where the destination routing node is located is the southeast, then the first channel can be determined to be the eastbound channel, and the second channel can be determined to be the southbound channel; if the area where the destination routing node is located is the southwest, then the first channel can be determined to be the westbound channel, and the second channel can be determined to be the southbound channel; if the area where the destination routing node is located is the northwest, then the first channel can be determined to be the westbound channel, and the second channel can be determined to be the northbound channel, and a relatively unobstructed channel can be selected for transmission.
[0118] Optionally, the output channel through which the current routing node sends data is determined based on the total number of data streams sent by the current output channel, see Figure 4 , showing a schematic diagram of a register in a routing path determination method provided by an embodiment of the present invention, by using a 12-bit register to record the number of flow control units currently sent by the current output channel, and resetting the register every 16 cycles to prevent register data overflow and prevent the occurrence of network starvation, wherein the maximum value of the number of flow control units that can be recorded in the top, middle and bottom parts of the register is 16, and only a 4-bit register is required to store each value.
[0119] By reading the numerical value of the register, the flow control unit transmission value of the first channel and the second channel can be obtained. The flow control unit transmission value represents the total number of flow control units currently sent by the current output channel. Through comparison, the channel with the smaller flow control unit transmission value is used as the target sub-channel.
[0120] In the process of scoring the first available output channel, the first channel and the second channel included in the first available output channel can be obtained. Based on the aforementioned comparison process of the first channel and the second channel, multiple target sub-channels corresponding to the first available output channel can be obtained, and by adding the flow control unit transmission values corresponding to each target sub-channel, the sum of the flow control unit transmission values corresponding to the first available output channel can be obtained. Based on the sum of the flow control unit transmission values, the global congestion score of the first available output channel can be calculated by the following formula:
[0121] DCA_Score=In(1 / n flops ) (8)
[0122] Among them, DCA_Score represents the global congestion score of the first available output channel, n flops Indicates the total number of flow control unit transmission values currently sent by the first available output channel.
[0123] In one example, the overall process of output channel scoring can refer to Figure 5 , showing a schematic diagram of an exemplary channel scoring in a routing path determination method provided by an embodiment of the present invention, sending frame header data, obtaining a number of available output channels according to the routing function module, calculating the DCA score, i.e., the global congestion score, based on the 12-bit register, calculating the switch switching blocking parameter and the channel blocking parameter based on the number of free buffer slots and the strength score of the adjacent routes, and calculating the final score in sequence according to the switch switching blocking parameter, the channel blocking parameter, and the DCA score, extracting the maximum score from them to determine the best channel.
[0124] In one example, for the two output channel directions of each region, a total of 8 registers are used in the embodiment of the present invention to store the global congestion score of each output channel. Specifically, the 8 groups of output channels may include: southeast, south-east, northeast, north-east, southwest, south-west, northwest, and north-west. For two output channels in the same region, the naming order represents the direction selection order of the output channels. Similarly, the data stored in all registers are reset every 16 cycles. By reading the registers, the global congestion score of the available output channel corresponding to the current routing node sending data to the destination routing node can be obtained.
[0125] In a possible implementation manner, before acquiring the secondary adjacent node that is two hops away from the current routing node, the following steps may also be included:
[0126] Get the number of the second available output channels of the current routing node;
[0127] If the number of the second available output channels is less than or equal to the first channel threshold, the second available output channel of the current routing node is used as the output path of the current routing node;
[0128] If the second available output channel quantity is greater than the first channel threshold, a secondary adjacent node two hops away from the current routing node is obtained.
[0129] In an embodiment of the present invention, a final output path is determined from available output channels of a current routing node and a second adjacent node, wherein an available output channel refers to the shortest available path from the current routing node to a destination routing node. When the number of available output channels for transmitting data from the current routing node to the destination routing node is only 1, the available output channel of the current routing node is used as the output path. Exemplarily, if the current routing node and the destination routing node are in the same row or column, the available output channel is a channel for transmission along a straight line. At this time, the number of available output channels is 1, and the available output channels of the second adjacent node and the second adjacent node are no longer obtained. Preferably, in an embodiment of the present invention, the first channel threshold is set to 1, and the present invention is not limited to this.
[0130] The embodiment of the present invention obtains a secondary neighboring node two hops away from the current routing node, determines a target secondary neighboring node according to the number of first available output channels connected to the secondary neighboring node, scores several first available output channels of the target secondary neighboring node in turn, and determines the output path of the current routing node according to the maximum score value, wherein the path availability, channel blocking degree, switch switching blocking degree and congestion degree of the target node are scored based on a preset scoring formula, and the available output channel of the target secondary neighboring node with the largest number of available output channels (Path_Availability), the lowest channel blocking degree (Free_Slots), the lowest switch switching blocking degree (Intensity) and the highest DCA score is selected as the best information interaction channel, and under the condition of considering the traffic load of each channel, a smooth and available output channel is selected to effectively improve the transmission performance of the network.
[0131] In one example, a computation unit for computing output channel scores may be created, referring to Figure 6 , shows a schematic diagram of an exemplary computing unit in a routing path determination method provided by an embodiment of the present invention. The computing unit is set in each routing node. Based on the connection characteristics of the routing node, the computing unit can receive the number of free buffer slots, neighbor unit scores, buffer data acquisition signals, and buffer data departure signals from the east, south, west, and north directions. Similarly, the adjacent nodes can also obtain the number of free buffer slots, neighbor unit scores, buffer data acquisition signals, and buffer data departure signals of the current routing node.
[0132] In one example, the number of free buffer slots can be iteratively calculated by the number of free buffer slots in the channel from the current routing node to the destination routing node. Each routing node will place a counter to count the total number of buffer slots, and at the same time count the free buffer slots in the adjacent node units through signal transmission. The calculation unit adds the free buffer slots of the current node and the free buffer slots of the neighboring nodes through an adder and stores them in a register. When the current routing node makes an information exchange request to the destination routing node, the calculation unit of the current routing node will iteratively add the free buffer slots in all shortest paths, and compare the number of free buffer slots in n paths, and select the path with the largest number of free buffer slots for transmission.
[0133] Based on the creation of calculation units, refer to Figure 7 , shows a schematic diagram of an exemplary routing structure in a routing path determination method provided by an embodiment of the present invention, each routing node includes a conversion switch, the current routing node sends a data request and obtains data, and the average input rate Average (ΔT) is obtained by calculating the average input density unit. in ), and the average output rate Average(ΔT out ), the average input rateAverage(ΔT in ) and the average output rateAverage(ΔT out ) is transmitted to the computing unit to obtain the switch blocking parameters.
[0134] In one example, a router mode is designed to determine the best output path of the current routing node. Figure 8 , showing a schematic diagram of the structure of an exemplary router in a routing path determination method provided by an embodiment of the present invention, wherein the router includes routing modules corresponding to different data transmission directions, wherein each input channel has an input queue with a FIFO input buffer, and each input buffer is connected to a routing module composed of a routing algorithm and a newly proposed output selection strategy, and an output selection decision of the current routing node is made based on the calculation result of the routing module, preferably, the output selection decision also needs to obtain neighbor node information (number of free buffer slots and channel scores) to measure the global blocking degree of the current network, after the output path is determined by the output channel selection switch, the output port can also be arbitrated through channel usage ruling, and the input channel connected to the final output path is determined according to the preset arbitration strategy, and the data connection between the input channel and the output path is established through the crossbar switch, wherein the preset arbitration strategy can include priority arbitration, polling arbitration, weighted fair queue arbitration or request / grant-based arbitration to complete the determination of the output path and the connection with the input channel.
[0135] In one example, to improve network connection efficiency, NoC routers should use the shortest possible internal delay to reach each frequency (cycle). Fig. 9 , which shows a schematic diagram of an exemplary strategy selection in a routing path determination method provided by an embodiment of the present invention, such as Fig. 9 As shown in (a), the baseline router selects the output channel and transmits data through the process of access buffer-route calculation-switch selection-cross port traversal-port link traversal. Fig. 9 (b), compared with the baseline router, the routing path method proposed in the present invention requires cascading the routing calculation module and the output selection function module, which may lead to an increase in the pipeline delay of the router. Different optimization methods can be used to improve the pipeline delay of the router. For example, Fig. 9 As shown in (c), the first routing module can be set in the upstream router for pre-calculation, namely the pre-routing calculation module, thereby reducing the high delay caused by the module cascade. Another method is to use the lookup table of the routing table in each routing node to find the available input channel from the current node to the two-hop node and then to the destination according to the target address in the header frame. The above method improves the router pipeline delay, but it will also increase the hardware implementation overhead by using additional circuits.
[0136] The embodiment of the present invention obtains the secondary adjacent node two hops away from the current routing node, determines the target secondary adjacent node according to the number of first available output channels connected to the secondary adjacent node, scores several first available output channels of the target secondary adjacent node in turn, determines the output path of the current routing node according to the maximum score value, scores the path availability, channel blocking degree, switch switching blocking degree and congestion degree of the target node based on the target node, selects the best information exchange channel, and selects a smooth and available output channel in consideration of the traffic load of each channel, thereby effectively improving the transmission performance of the network.
[0137] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0138] Reference Fig.10 , shows a structural block diagram of a routing path determination device provided by an embodiment of the present invention, which may specifically include the following modules:
[0139] The secondary adjacent node acquisition module 1001 is used to respond to the data transmission request sent by the current routing node and acquire the secondary adjacent node that is two hops away from the current routing node;
[0140] The target secondary adjacent node determination module 1002 is used to obtain the first available output channel number of the secondary adjacent nodes, and select the target secondary adjacent node from each secondary adjacent node according to the first available output channel number;
[0141] A channel score calculation module 1003 is used to score a plurality of first available output channels of a target secondary adjacent node to obtain a channel score of each first available output channel;
[0142] The output path determination module 1004 is configured to use the first available output channel with the largest channel score as a target available output channel, and use the target available output channel as an output path of the current routing node.
[0143] Furthermore, the target secondary adjacent node determination module 1002 includes:
[0144] A first available output channel quantity acquisition module, used to acquire the network topology structure of the secondary adjacent node, and calculate the first available output channel quantity of the secondary adjacent node by combining the network topology structure with the shortest path algorithm;
[0145] The target secondary adjacent node determination submodule is used to obtain a maximum value from each first available output channel quantity, and use the secondary adjacent node corresponding to the maximum value as the target secondary adjacent node.
[0146] Furthermore, the channel score calculation module 1003 includes:
[0147] A parameter acquisition module, used to acquire the number of available paths, switch switching blocking parameters, channel blocking parameters and a global congestion score of the first available output channel;
[0148] The scoring calculation submodule is used to calculate the channel score of the first available output channel by adding the number of available paths, the switch switching blocking parameter, the channel blocking parameter and the global blocking score according to a preset scoring formula.
[0149] Furthermore, there is a buffer for data transmission between routing nodes, and the parameter acquisition module includes:
[0150] An average rate acquisition module is used to obtain the average input rate and average output rate of the buffer;
[0151] A first switch switching blocking module, configured to set a switch switching blocking parameter to a first preset parameter value if the average input rate is greater than the average output rate;
[0152] The second switch switching blocking module sets the switch switching blocking parameter to a second preset parameter value if the average input rate is less than or equal to the average output rate.
[0153] Furthermore, the path of the buffer includes a plurality of buffer slots, and the parameter acquisition module further includes:
[0154] A buffer slot quantity acquisition module is used to obtain the total number and occupied number of buffer slots in the buffer zone;
[0155] A buffer slot free quantity acquisition module is used to calculate the free quantity of buffer slots based on the total quantity and the occupied quantity;
[0156] The channel blocking parameter acquisition module is used to obtain the channel blocking parameters corresponding to the idle quantity.
[0157] Furthermore, the parameter acquisition module also includes:
[0158] The regional division module is used to obtain the network topology structure of the current routing node and the destination routing node to send data, and divide the network topology structure into four regions: northeast, southeast, southwest and northwest, taking the current routing node as the origin;
[0159] A location determination module, used to determine the location of the destination routing node based on the location coordinates of the destination routing node;
[0160] A channel confirmation module is used to determine that if the region is northeast, the first channel through which the current routing node sends data to the destination routing node is the east channel, and the second channel is the north channel;
[0161] Channel confirmation module 2: If the area is southeast, the first channel is determined to be the east channel and the second channel is the south channel;
[0162] Channel confirmation module 3: If the area is southwest, the first channel is determined to be the west channel and the second channel is the south channel;
[0163] Channel confirmation module 4: If the area is northwest, the first channel is determined to be the west channel and the second channel is the north channel;
[0164] A flow control unit acquisition module, used to acquire a flow control unit transmission value of a first channel and a flow control unit transmission value of a second channel;
[0165] A target sub-channel confirmation module, used for taking the channel with a smaller transmission value of the flow control unit as the target sub-channel;
[0166] A flow control unit sum acquisition module, configured to acquire a flow control unit transmission value sum corresponding to the first available output channel based on a target subchannel corresponding to the first available output channel;
[0167] A global congestion score acquisition module is used to calculate the global congestion score of the first available output channel based on the sum of the transmission values of the flow control unit.
[0168] Furthermore, the device also includes:
[0169] A second available channel quantity acquisition module, used to acquire the second available output channel quantity of the current routing node;
[0170] an output path determination submodule, configured to use the second available output channel of the current routing node as the output path of the current routing node if the number of the second available output channels is less than or equal to the first channel threshold;
[0171] The secondary adjacent node acquisition submodule acquires the secondary adjacent node that is two hops away from the current routing node if the second available output channel quantity is greater than the first channel threshold.
[0172] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0173] refer to Fig.11 An embodiment of the present invention further provides an electronic device, comprising a memory 1103, a processor 1101, a communication interface 1102, and a program stored in the memory and executable on the processor; wherein the processor is configured to read the program on the memory and execute a routing path determination method as disclosed in any of the above embodiments.
[0174] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0175] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0176] The embodiment of the present invention further provides a non-volatile readable storage medium. When the instructions in the non-volatile readable storage medium are executed by the processor of the electronic device, the electronic device can perform the various processes of the above-mentioned routing path determination method embodiment and achieve the same technical effect. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0177] It should be noted that, in this article, the terms "include", "comprises" or any other variations 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 "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0178] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0179] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the embodiments of the present invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0180] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A method for determining a routing path, characterized in that: The method comprises: In response to a data transmission request sent by a current routing node, obtaining a secondary adjacent node two hops away from the current routing node; Acquire the first available output channel quantity of the secondary adjacent nodes, and select a target secondary adjacent node from each of the secondary adjacent nodes according to the first available output channel quantity; Scoring a plurality of first available output channels of the target secondary adjacent node to obtain a channel score of each first available output channel; The first available output channel with the largest channel score is used as the target available output channel, and the target available output channel is used as the output path of the current routing node.
2. The method according to claim 1, characterized in that The obtaining of the first available output channel number of the secondary adjacent nodes and selecting a target secondary adjacent node from each of the secondary adjacent nodes according to the first available output channel number includes: Acquire the network topology structure of the secondary neighboring node, and calculate the number of first available output channels of the secondary neighboring node by combining the network topology structure with a shortest path algorithm; A maximum value is obtained from each of the first available output channel quantities, and a secondary adjacent node corresponding to the maximum value is used as the target secondary adjacent node.
3. The method according to claim 1, characterized in that The step of scoring a plurality of first available output channels of the target secondary adjacent node to obtain a channel score of each first available output channel includes: Obtaining the number of available paths, switch switching blocking parameters, channel blocking parameters, and a global congestion score of the first available output channel; According to a preset scoring formula, the number of available paths, the switch switching blocking parameter, the channel blocking parameter and the global blocking score are added to calculate a channel score of the first available output channel.
4. The method according to claim 3, characterized in that There is a buffer for data transmission between routing nodes, and the obtaining of the switch switching blocking parameter of the first available output channel includes: Obtaining an average input rate and an average output rate of the buffer; If the average input rate is greater than the average output rate, setting the switch switching blocking parameter to a first preset parameter value; If the average input rate is less than or equal to the average output rate, the switch switching blocking parameter is set to a second preset parameter value.
5. The method according to claim 4, characterized in that The path of the buffer includes a plurality of buffer slots, and the obtaining of the channel blocking parameter of the first available output channel includes: Obtain the total number and occupied number of buffer slots in the buffer; Calculate the free number of the buffer slots based on the total number and the occupied number; Get the channel blocking parameter corresponding to the idle quantity.
6. The method according to claim 3, characterized in that The obtaining of the global blocking score of the first available output channel comprises: Obtaining a network topology structure of the current routing node and a destination routing node for sending data, and dividing the network topology structure into four regions: northeast, southeast, southwest, and northwest, with the current routing node as the origin; Determining a location of the destination routing node based on the location coordinates of the destination routing node; If the region is northeast, determining that the first channel through which the current routing node sends data to the destination routing node is an eastbound channel, and the second channel is a northbound channel; If the location is southeast, the first channel is determined to be an eastward channel, and the second channel is determined to be a southward channel; If the area is southwest, the first channel is determined to be a westward channel, and the second channel is determined to be a southward channel; If the area is northwest, the first channel is determined to be a westward channel, and the second channel is determined to be a northward channel; Obtaining a flow control unit transmission value of the first channel and a flow control unit transmission value of the second channel; Taking the channel with the smaller transmission value of the flow control unit as the target subchannel; Based on the target subchannel corresponding to the first available output channel, acquiring the sum of flow control unit transmission values corresponding to the first available output channel; A global congestion score of the first available output channel is calculated based on the sum of the flow control unit transmission values.
7. The method according to claim 1, characterized in that Before acquiring the secondary adjacent node that is two hops away from the current routing node, the method further includes: Obtaining the number of second available output channels of the current routing node; If the number of the second available output channels is less than or equal to the first channel threshold, using the second available output channel of the current routing node as the output path of the current routing node; If the number of the second available output channels is greater than the first channel threshold, a secondary adjacent node two hops away from the current routing node is obtained.
8. A routing path determination device, characterized in that: The device comprises: A secondary adjacent node acquisition module, configured to respond to a data transmission request sent by a current routing node and acquire a secondary adjacent node two hops away from the current routing node; A target secondary adjacent node determination module is used to obtain the first available output channel quantity of the secondary adjacent nodes, and select a target secondary adjacent node from each of the secondary adjacent nodes according to the first available output channel quantity; A channel score calculation module, used to score a plurality of first available output channels of the target secondary adjacent node to obtain a channel score of each first available output channel; The output path determination module is used to use the first available output channel with the largest channel score as a target available output channel, and use the target available output channel as the output path of the current routing node.
9. An electronic device, comprising: one or more processors; Memory; One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the routing path determination method according to any one of claims 1 to 7.
10. A non-volatile readable storage medium, when instructions in the non-volatile readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the routing path determination method according to any one of claims 1 to 7.
Citation Information
Cited By
Data routing method and device, electronic equipment, storage medium and program product
CN121585604A
