Routing node, data packet sending method, storage medium and electronic device
By designing an adaptive routing hardware structure in the routing node, using real-time routing path calculation and virtual channel allocation, the problem that traditional routing methods cannot respond to network changes is solved, and more efficient network transmission performance is achieved.
Patent Information
- Application Number
- CN202510126679.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-27
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2045-01-27
AI Technical Summary
Traditional deterministic routing methods cannot respond to dynamic network changes, and performance decreases rapidly when network congestion increases.
A routing node hardware structure is designed, including an input unit, a routing path calculation unit, a switch allocator and a cross switch matrix. Adaptive routing is realized by calculating the routing path and virtual channel allocation of data packets in real time.
This solution can select appropriate routing routes based on real-time network status, improve transmission performance, avoid network congestion, and solve the problem of performance degradation of traditional routing methods when network congestion is performed.
Smart Images

Figure CN119583436B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of chip design, and more specifically, to a routing node, a method for sending a data packet, a storage medium, and an electronic device. Background Art
[0002] Deterministic routing is a common type of routing. Its routing path is only related to the starting address and the end address. Given the starting and end addresses, the routing path is determined and has nothing to do with the current network status. Among deterministic routing, dimension-ordered routing is the most commonly used because it has a very simple and easy-to-implement routing logic. In dimension-ordered routing, each data packet is routed on only one dimension at a time. After reaching the appropriate coordinates on this dimension, it is routed on another dimension in the order from low dimension to high dimension. Because data packets are routed in the channel in a strictly monotonous order of dimensional changes, dimension-ordered routing is also deadlock-free. According to routing in networks with different topologies, dimension-ordered routing includes XY routing in 2D Mesh and E-cube in HyperCube.
[0003] The advantage of deterministic routing is that the routing algorithm is simple and can achieve lower latency in low network congestion environments. However, since it cannot respond to dynamic changes in network status, performance degrades rapidly when network congestion increases. The so-called adaptive routing means that the routing path of a data packet is not only related to the starting address and the end address, but also takes into account the state of the network. In other words, data packets with the same pair of start / end addresses may have different routing paths under different network conditions. The advantage of adaptive routing is that it uses an adaptive routing path to avoid network congestion and obtain a higher network bandwidth saturation value; however, its routing logic is more complex, with higher overhead in low network congestion conditions, and there is also a deadlock problem. In on-chip networks, due to the limitations of the routing node structure, relatively simple adaptive algorithms are generally used, such as dimension-order routing with a certain degree of adaptability.
[0004] In the related technology, the traditional deterministic routing method cannot respond to dynamic network changes. When the network congestion increases, the performance decreases rapidly. No effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present application provide a routing node, a method for sending a data packet, a storage medium, and an electronic device to at least solve the problem in the related art that the traditional deterministic routing method cannot respond to dynamic network changes and the performance decreases rapidly when the network congestion increases.
[0006] According to an embodiment of the present application, a routing node is provided, comprising: a first input unit, configured to receive a first data packet, wherein the first input unit is an input unit of a first routing node; a routing path calculation unit, connected to the first input unit, configured to obtain data information carried by the first data packet, and perform routing path calculation on the first data packet according to the data information to determine a first output unit corresponding to the first data packet, wherein the data information is at least used to indicate a destination address of the first data packet, and the first output unit is an output unit of the first routing node; a switch distributor, connected to the first input unit and the routing path calculation unit, configured to perform switch use right arbitration on the first input unit according to the first output unit; a cross switch matrix, connected to the switch distributor, the first input unit and the first output unit, configured to transmit the first data packet from the first input unit to the first output unit upon receiving arbitration information sent by the switch distributor, wherein the arbitration information is used to indicate that the first input unit obtains the switch use right; and the first output unit, configured to send the first data packet to a second input unit of a second routing node upon receiving the first data packet through the cross switch matrix, wherein the second routing node is a next-level routing node of the first routing node.
[0007] In an exemplary embodiment, the first input unit includes multiple first virtual channels, and a second virtual channel among the multiple first virtual channels is used to: split the first data packet into a header data packet, an intermediate data packet and a tail data packet, wherein the header data packet includes the data information, the intermediate data packet includes the actual data of the first data packet, and the tail data packet is used to indicate the data end point of the first data packet; decode the header data packet to obtain the data information; send the data information to the routing path calculation unit to instruct the routing path calculation unit to perform routing path calculation for the first data packet according to the data information, and send the data information to the virtual channel distributor of the first routing node to instruct the virtual channel distributor to allocate a third virtual channel for the second virtual channel according to the data information, wherein the first output unit includes the third virtual channel, and the third virtual channel is used to send the first data packet from the first input unit to the first output unit.
[0008] In an exemplary embodiment, the virtual channel distributor is connected to the first input unit, the first output unit and the switch distributor, and is used to: receive a plurality of first channel credits sent by the first output unit, wherein the first output unit includes a plurality of fourth virtual channels, the plurality of fourth virtual channels include the third virtual channel, the plurality of first channel credits correspond to the plurality of fourth virtual channels one by one, and the plurality of first channel credits are used to indicate idle resources of the plurality of fourth virtual channels; receive a plurality of data information sent by a plurality of fifth virtual channels, wherein the plurality of first virtual channels include the plurality of fifth virtual channels, and the plurality of fifth virtual channels are all waiting to send data packets to the third virtual channel; allocate the third virtual channel to the second virtual channel according to the second channel credit of the third virtual channel and the channel requirement information in the plurality of data information, and if the allocation is successful, send the allocation result to the switch distributor to instruct the switch distributor to start arbitrating the switch usage right of the first input unit, wherein the channel requirement information is used to indicate the virtual channel size required for the first data packet.
[0009] In an exemplary embodiment, the first output unit further includes: a credit counter, connected to the second input unit, the routing path calculation unit and the virtual channel distributor, and used to update the third channel credits of multiple sixth virtual channels of the second input unit when the second input unit successfully receives the second data packet, obtain the multiple first channel credits, and send the multiple first channel credits to the routing path calculation unit and the virtual channel distributor, wherein the second data packet is the previous data packet sent by the first output unit.
[0010] In an exemplary embodiment, the first output unit is further used to: upon receiving the first data packet, send the head data packet, the middle data packet and the tail data packet to the second input unit respectively; and upon determining that the tail data packet is sent successfully, update the credit counter.
[0011] In an exemplary embodiment, the routing path calculation unit is connected to the adaptive routing unit, and is also used to: request target information from the adaptive routing unit, wherein the target information includes: input weight information, route correction information; if the target information is not requested, perform routing path calculation on the first data packet according to the destination address and the starting address corresponding to the routing node, determine the next-level routing node of the first data packet, and determine the first output unit in the routing node that is connected to the next-level routing node.
[0012] In an exemplary embodiment, the routing path calculation unit is further used to: when the target information is requested, receive the data information sent by the first input unit and the multiple first channel credits sent by the first output unit, wherein the first output unit includes multiple fourth virtual channels, the multiple fourth virtual channels include the third virtual channel, the multiple first channel credits correspond to the multiple fourth virtual channels one by one, and the multiple first channel credits are used to indicate the idle resources of the multiple fourth virtual channels; when the target information is the input weight information, perform weighted operation on the multiple first channel credits according to the input weight information to obtain multiple first operation results, determine the first target virtual channel corresponding to the second operation result, and determine the first target virtual channel where the first target virtual channel is located. The first output unit is configured to output the second operation result, wherein the second operation result is the largest among the multiple first operation results, and the first target virtual channel is connected to the next-level routing node; when the target information is the input weight information and the route correction information, the weight of the second routing node among the multiple first routing nodes is modified according to the route correction information and the input weight information to obtain the modified weight information, and the multiple first channel credits are weighted according to the modified weight information to obtain multiple third operation results, determine the second target virtual channel corresponding to the fourth operation result, and determine the first output unit where the second target virtual channel is located, wherein the fourth operation result is the largest among the multiple third operation results, and the second target virtual channel is connected to the next-level routing node.
[0013] In an exemplary embodiment, the switch distributor is further used to: receive multiple path calculation results sent by the routing path calculation unit, wherein the multiple path calculation results are used to indicate that multiple second input units correspond to the first output unit, and the multiple second input units include the first input unit; upon receiving the multiple allocation results sent by the virtual channel distributor, perform switch usage right arbitration on the multiple second input units to determine the order in which the multiple second input units obtain the switch usage right, wherein the multiple allocation results correspond one-to-one to the multiple second input units; and upon determining that the first input unit obtains the switch usage right, send the arbitration information to the first input unit and the cross switch matrix.
[0014] In an exemplary embodiment, the first input unit is further used to: upon receiving the arbitration information sent by the switch distributor, send the header data packet, the intermediate data packet and the tail data packet to the cross switch matrix, respectively, so as to send the header data packet, the intermediate data packet and the tail data packet to the first output unit, respectively, through the cross switch matrix.
[0015] In an exemplary embodiment, the cross switch matrix is further used to: upon receiving the arbitration information, receive the header data packet, the intermediate data packet and the tail data packet sent by the first input unit; establish a connection path between the first input unit and the first output unit; and send the header data packet, the intermediate data packet and the tail data packet to the first output unit respectively through the connection path.
[0016] In an exemplary embodiment, the routing node also includes: a software scheduling module, which is connected to the credit counters of multiple routing nodes, and is used to count the channel credits of the virtual channels of the multiple routing nodes. When it is determined based on the multiple channel credits that the target virtual channel of the third routing node has network congestion, the target virtual channel is expanded and the channel credit of the target virtual channel is updated, wherein the multiple routing nodes include the third routing node.
[0017] According to another embodiment of the present application, a method for sending a data packet is provided, including: receiving the first data packet through the first input unit; acquiring the data information carried by the first data packet through the routing path calculation unit, and performing routing path calculation on the first data packet according to the data information to determine the first output unit corresponding to the first data packet; arbitrating the switch usage right of the first input unit according to the first output unit through the switch distributor; transmitting the first data packet from the first input unit to the first output unit through the cross switch matrix when the cross switch matrix receives the arbitration information sent by the switch distributor; and sending the first data packet to the second input unit when the first output unit receives the first data packet.
[0018] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when run.
[0019] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0020] According to another embodiment of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps of the method described in each embodiment of the present application are implemented.
[0021] The present application provides a new routing node, comprising: a first input unit, for receiving a first data packet; a routing path calculation unit, connected to the first input unit, for obtaining data information carried by the first data packet, performing routing path calculation according to the data information, and determining a first output unit corresponding to the first data packet according to the calculated path, wherein the data information is used to indicate a destination address of the first data packet; a switch distributor, connected to the first input unit and the routing path calculation unit, for arbitrating switch use rights for the first input unit according to the first output unit; and a cross switch matrix, connected to the switch distributor, the first input unit, and the first output unit, for arbitrating the first data packet upon receiving arbitration information sent by the switch distributor. The data packet is transmitted from the first input unit to the first output unit, completing the transmission of the first data packet inside the first routing node; finally, the first output unit is used to send the first data packet to the second output unit of the second routing node after receiving the first data packet, wherein the second routing node is a next-level routing node of the first routing node; adopting the above scheme, based on the improvement strategy of combining software and hardware, a new routing node hardware structure is proposed, and based on the structure, an adaptive routing method is implemented, which can select a suitable routing route in combination with the real-time network status to ensure the transmission performance; thereby solving the problem in the related technology that the traditional deterministic routing method cannot respond to dynamic network changes and the performance decreases rapidly when the network congestion increases. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 It is a hardware structure block diagram of a computer terminal according to a method for sending a data packet in an embodiment of the present application;
[0023] Figure 2 is a structural block diagram of a routing node according to an embodiment of the present application;
[0024] Figure 3 is a structural block diagram of an optional routing node according to an embodiment of the present application;
[0025] Figure 4 is a flow chart of an optional credit refresh mechanism according to an embodiment of the present application;
[0026] Figure 5 is a schematic diagram of an optional virtual channel size change according to an embodiment of the present application;
[0027] Figure 6 is a flow chart of a method for sending a data packet according to an embodiment of the present application;
[0028] Figure 7 is a schematic diagram of a data flow process of a data packet according to an embodiment of the present application;
[0029] Figure 8 It is a schematic diagram of an optional routing node design scenario according to an embodiment of the present application. DETAILED DESCRIPTION
[0030] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0032] The method embodiments provided in the embodiments of the present application can be executed in a computer terminal or a similar computing device. Taking running on a computer terminal as an example, Figure 1 1 is a hardware structure block diagram of a computer terminal of a method for sending a data packet according to an embodiment of the present application. Figure 1 As shown, the computer terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the above-mentioned computer terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above-mentioned computer terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0033] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for sending a data packet in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0034] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of a computer terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0035] The following is an explanation of the professional terms that appear in this application:
[0036] FPGA: Field-Programmable Gate Array, field programmable gate array;
[0037] RAM: random access memory;
[0038] Verilog: hardware description language;
[0039] VC: virtual channel;
[0040] FIFO: First-in-first-out buffer;
[0041] Router: routing node.
[0042] In this embodiment, a routing node is provided. Figure 2 is a structural block diagram of a routing node according to an embodiment of the present application, such as Figure 2 As shown, the routing node includes:
[0043] A first input unit 21, configured to receive a first data packet, wherein the first input unit is an input unit of the first routing node 20;
[0044] a routing path calculation unit 22, connected to the first input unit, configured to obtain data information carried by the first data packet, and perform routing path calculation on the first data packet according to the data information, to determine a first output unit corresponding to the first data packet, wherein the data information is at least used to indicate a destination address of the first data packet, and the first output unit is an output unit of the first routing node;
[0045] a switch distributor 23, connected to the first input unit and the routing path calculation unit, and configured to arbitrate the switch use right of the first input unit according to the first output unit;
[0046] a cross switch matrix 24, connected to the switch distributor, the first input unit and the first output unit, and configured to transmit the first data packet from the first input unit to the first output unit upon receiving arbitration information sent by the switch distributor, wherein the arbitration information is used to indicate that the first input unit obtains the right to use the switch;
[0047] The first output unit 25 is used to send the first data packet to the second input unit of a second routing node when the first data packet is received through the cross switch matrix, wherein the second routing node is a next-level routing node of the first routing node.
[0048] The above scheme proposes a new routing node, including: a first input unit, used to receive a first data packet; a routing path calculation unit, connected to the first input unit, used to obtain data information carried by the first data packet, perform routing path calculation according to the data information, and determine the first output unit corresponding to the first data packet according to the calculated path, wherein the data information is used to indicate the destination address of the first data packet; a switch distributor, connected to the first input unit and the routing path calculation unit, used to arbitrate the switch use right of the first input unit according to the first output unit; a cross switch matrix, connected to the switch distributor, the first input unit and the first output unit, used to distribute the first data packet to the first output unit upon receiving the arbitration information sent by the switch distributor. The packet is transmitted from the first input unit to the first output unit, completing the transmission of the first data packet inside the first routing node; finally, the first output unit is used to send the first data packet to the second output unit of the second routing node after receiving the first data packet, wherein the second routing node is a next-level routing node of the first routing node; adopting the above scheme, based on the improvement strategy of combining software and hardware, a new routing node hardware structure is proposed, and based on the structure, an adaptive routing method is implemented, which can select a suitable routing route in combination with the real-time network status to ensure the transmission performance; thereby solving the problem in the related technology that the traditional deterministic routing method cannot respond to dynamic network changes and the performance decreases rapidly when the network congestion increases.
[0049] In an exemplary embodiment, the first input unit includes multiple first virtual channels, and a second virtual channel among the multiple first virtual channels is used to: split the first data packet into a header data packet, an intermediate data packet and a tail data packet, wherein the header data packet includes the data information, the intermediate data packet includes the actual data of the first data packet, and the tail data packet is used to indicate the data end point of the first data packet; decode the header data packet to obtain the data information; send the data information to the routing path calculation unit to instruct the routing path calculation unit to perform routing path calculation for the first data packet according to the data information, and send the data information to the virtual channel distributor of the first routing node to instruct the virtual channel distributor to allocate a third virtual channel for the second virtual channel according to the data information, wherein the first output unit includes the third virtual channel, and the third virtual channel is used to send the first data packet from the first input unit to the first output unit.
[0050] The input unit is mainly responsible for receiving data from other routing nodes, including multiple virtual channels (i.e., the multiple first virtual channels mentioned above), which can simultaneously perform data reception and data forwarding. After receiving the data packet, the second virtual channel splits the data packet into head flit (i.e., head data packet), body flit (middle data packet), and tail flit (i.e., tail data packet); when the data is encapsulated into a series of flits (data units) for transmission, the head data packet contains control information, such as source address, destination address, etc.; the middle data packet contains the actual data payload, and the tail data packet is the last one in this series of flits, which marks the end of the data packet. In the on-chip network or routing mechanism, the role of the tail data packet is to notify the receiver that the transmission of the data packet has been completed, which is particularly important when the data packets are transmitted out of order or need to be reassembled; in short, the tail data packet is the end mark of the data packet or message, which helps the receiver to correctly process and reassemble the received data packets. After decoding the header data packet, the first input unit can obtain data information including the destination address, and then send the data information to the routing path calculation unit, which performs routing path calculation on the first data packet in real time; at the same time, the data information is sent to the virtual channel distributor to allocate the third virtual channel to the second virtual channel.
[0051] Through this embodiment, after receiving a data packet, the routing node will perform routing path calculation in real time according to the data information, so that the most appropriate path can be selected for data transmission according to the real-time network conditions, thereby improving network transmission efficiency.
[0052] Further, the virtual channel distributor is connected to the first input unit, the first output unit and the switch distributor, and is used to: receive multiple first channel credits sent by the first output unit, wherein the first output unit includes multiple fourth virtual channels, the multiple fourth virtual channels include the third virtual channel, the multiple first channel credits correspond to the multiple fourth virtual channels one by one, and the multiple first channel credits are used to indicate idle resources of the multiple fourth virtual channels; receive multiple data information sent by multiple fifth virtual channels, wherein the multiple first virtual channels include the multiple fifth virtual channels, and the multiple fifth virtual channels are all waiting to send data packets to the third virtual channel; allocate the third virtual channel to the second virtual channel according to the second channel credit of the third virtual channel and the channel requirement information in the multiple data information, and if the allocation is successful, send the allocation result to the switch distributor to instruct the switch distributor to start arbitrating the switch usage rights of the first input unit, wherein the channel requirement information is used to indicate the virtual channel size required for the first data packet.
[0053] In the embodiment of the present application, the first routing node also includes a virtual channel distributor, which is connected to the first input unit, the first output unit and the switch distributor, and is used to receive multiple first channel credits sent by the first output unit, the first output unit includes multiple fourth virtual channels (including the third virtual channel), and the multiple fourth virtual channels correspond to the multiple first channel credits one by one, and the first channel credit is used to indicate the idle resources of the fourth virtual channel; receive multiple data information sent by multiple fifth virtual channels of the input unit, and these fifth virtual channels all need to send data packets to the third virtual channel; then the virtual channel distributor completes the allocation of the second virtual channel of the input unit and the third virtual channel of the output unit according to the second channel credit of the third virtual channel and the channel demand information indicated by the multiple data information, ensuring that one output virtual channel is allocated to at most one input virtual channel, and each input virtual channel is granted at most one output virtual channel. After the allocation is completed, the allocation result is sent to the switch distributor, indicating that the switch distributor starts to arbitrate the switch use right of the first input unit.
[0054] After completing the routing path calculation of the first data packet through the routing path calculation unit, the first output unit corresponding to the first data packet and the third virtual channel on the first output unit can be determined. However, there are multiple input units in the routing node, so there may be multiple fifth virtual channels that need to send data packets through the third virtual channel. In order to ensure the orderliness of data transmission, channels need to be allocated.
[0055] Optionally, if only one fifth virtual channel requests the third virtual channel to send the first data packet at the same time, the virtual channel allocator can confirm whether the remaining credits of the third virtual channel are sufficient to send the first data packet. If there are sufficient credits, the request will be approved, otherwise the sending will be delayed.
[0056] Through this embodiment, the routing allocation of data packets is determined by the virtual channel distributor, which ensures flow control and congestion avoidance in the network, while ensuring lossless transmission of data packets and high service quality.
[0057] Furthermore, the first output unit also includes: a credit counter, which is connected to the second input unit, the routing path calculation unit and the virtual channel distributor, and is used to update the third channel credits of multiple sixth virtual channels of the second input unit when the second input unit successfully receives the second data packet, obtain the multiple first channel credits, and send the multiple first channel credits to the routing path calculation unit and the virtual channel distributor, wherein the second data packet is the previous data packet sent by the first output unit.
[0058] The output unit of each routing node maintains a credit counter to record the remaining credits of the input unit of each target routing node on the routing path. Because the routing process cannot lose packets, the credit mechanism is used to allow the upper-level routing node to determine the available cache. When a data packet is sent from the output unit and successfully received and processed by the input unit of the target routing node, the target routing node returns a credit to the source routing node (i.e., the first routing node). The output unit of the source routing node will update the credit counter accordingly; after the update is completed, the channel counter will synchronize the updated credit value to the routing path calculation unit and the virtual channel allocator to ensure the accuracy of the relevant calculations.
[0059] Through this embodiment, the credit counter ensures that the remaining buffer of each input and output unit can be accurately known, which ensures the smooth completion of tasks such as routing path calculation and virtual channel allocation, thereby improving the accuracy of routing.
[0060] Optionally, the first output unit is further used to: upon receiving the first data packet, send the head data packet, the middle data packet and the tail data packet to the second input unit respectively; upon determining that the tail data packet is sent successfully, update the credit counter.
[0061] In an embodiment of the present application, two pipelines are used to complete data transmission, one pipeline processes the head data packet and the other pipeline processes the middle data packet and the tail data packet; the path calculation is performed based on the head data packet, and then the middle data packet and the tail data packet share the head data packet path, the head data packet, the middle data packet and the tail data packet can pass through multiple nodes in disorder and converge at a fixed node (i.e., the second input unit); at the same time, after determining that the tail data packet has been sent successfully, the credit counter is updated to release the virtual channel resources reserved for the first data packet.
[0062] Through this embodiment, multiple pipelines are used to perform data transmission simultaneously, making data transmission more flexible, faster and more efficient.
[0063] Optionally, the routing path calculation unit is connected to the adaptive routing unit, and is also used to: request target information from the adaptive routing unit, wherein the target information includes: input weight information, route correction information; if the target information is not requested, perform routing path calculation on the first data packet according to the destination address and the starting address corresponding to the routing node, determine the next-level routing node of the first data packet, and determine the first output unit in the routing node that is connected to the next-level routing node.
[0064] The routing node of the embodiment of the present application also includes an adaptive route, which is connected to an XY routing path calculator (ie, a routing path calculation unit), such as Figure 3 As shown, the adaptive routing can receive XY adaptive weight input (i.e. input weight information) and XY software correction (i.e. route correction information); before starting the path calculation, the routing path calculation unit will first request the target information from the adaptive routing; if the target information is not requested, that is, there is no weight input, the path calculation is performed with the shortest path as the target.
[0065] Example: Input: Routing adjacent point R n0 ,R n1 ; Starting point route R (x0, y0), end point route R (x i ,y n ); Output: Routing route. If there is no weight input, R(x0, y0) moves left by i Rs and moves down by n Rs to reach the destination route R(x i ,y n ), the R passed is a routing route; determining the next-level routing node of the first routing node according to the routing route, and determining the first output unit in the first routing node connected to the next-level routing node; completing the path calculation.
[0066] Optionally, the routing path calculation unit is further used to: when the target information is requested, receive the data information sent by the first input unit and the multiple first channel credits sent by the first output unit, wherein the first output unit includes multiple fourth virtual channels, the multiple fourth virtual channels include the third virtual channel, the multiple first channel credits correspond one-to-one to the multiple fourth virtual channels, and the multiple first channel credits are used to indicate the idle resources of the multiple fourth virtual channels; when the target information is the input weight information, perform weighted operation on the multiple first channel credits according to the input weight information to obtain multiple first operation results, determine the first target virtual channel corresponding to the second operation result, and determine the first input where the first target virtual channel is located. output unit, wherein the second operation result is the largest among the multiple first operation results, and the first target virtual channel is connected to the next-level routing node; when the target information is the input weight information and the route correction information, the weight of the second routing node among the multiple first routing nodes is modified according to the route correction information and the input weight information to obtain the modified weight information, and the multiple first channel credits are weighted according to the modified weight information to obtain multiple third operation results, determine the second target virtual channel corresponding to the fourth operation result, and determine the first output unit where the second target virtual channel is located, wherein the fourth operation result is the largest among the multiple third operation results, and the second target virtual channel is connected to the next-level routing node.
[0067] If there is a weight input and no route correction, the MCSC value of the neighboring point can be calculated (message counterstate counter, ), where F mcsc is the MCSC value, W0, W1, W2, W3, and W4 are all weight values, and R msg cnt is the number of messages received by the routing node, R idle cnt , R wbusy cnt , R busy cnt , R bad is the number of times the routing node switches to different states (states include: idle, wbusy, busy, and bad), and compares R(x0, y0) with R n0 ,R n1 MCSC, get the larger one, and determine the routing node of the larger one as the next level routing node; if there is an input weight and a route correction, mark the path of the route correction , when calculating the MCSC value of the neighboring point, the weight value of the route correction needs to be increased. ,If the actual R is on the corrected route, the weight value of W5 is to make the adjacent point currently selected by R move closer to the corrected route, and then reach the corrected route, thereby determining the next level of routing nodes.
[0068] However, after a data packet is sent from the output unit and successfully received and processed by the input unit of the target routing node, the target routing node will return a credit to the source routing node, and the output unit of the source routing node will update the credit register accordingly, increasing the credit count of the corresponding input unit of the target routing node. The output unit tracks the state of the virtual channel of the downstream routing node through multiple registers (state includes: idle, weakbusy, busy, bad, etc.), thereby obtaining the above R idle cnt , R wbusy cnt During the virtual channel allocation phase, the virtual channel allocator will update these status information according to the software scheduling policy (such as the SRAM mapping mechanism). For example, if the cache depth of a VC (virtual channel) is adjusted according to the software policy, the status of this VC may change from "busy" to "weakbusy" or "idle" so that other data packets can be allocated to this VC more quickly. The credit refresh mechanism is as follows Figure 4 As shown, it includes the following processes:
[0069] 4.1. Packet arrival: When a packet (flit) arrives at the input unit of routing node Router0, it is assigned to a specific virtual channel (VC) for buffering. This process is controlled by the input unit, and each VC contains at least one hardware FIFO (first-in-first-out buffer).
[0070] 4.2 Credit Check: Before a data packet is ready to be sent from an output unit, the output unit will check the remaining credit of the input unit of the target routing node on the XY path. The credit mechanism is an important means to ensure that data packets are not lost during the routing process. Each output unit has a credit counter to record the number of data packets that can be received.
[0071] 4.3. Data packet transmission: Once the output unit has enough credit to receive a new data packet, the data packet will be sent to the next routing node Router1. After transmission, the input unit of the target routing node will confirm the receipt of the data packet and return a credit to the source routing node Router0. The output unit of the source routing node updates the credit register accordingly and increases the credit count of the corresponding input unit of the target routing node.
[0072] 4.4 Credit Refresh: Credit refresh is a key step that ensures the reasonable allocation and use of network resources. When a data packet is successfully transmitted and processed by the input unit of the target routing node, the target routing node will send the credit refresh information back to the output unit of the source routing node. This mechanism enables the routing node to understand the buffer status of the downstream node in real time, so as to make more reasonable sending decisions.
[0073] 4.5. Software Scheduling Strategy: The software obtains the usage of VC channels in real time through the SRAM mapping mechanism. Based on this information, the software can formulate the most reasonable correction route, adjust the depth of the virtual channel, and allocate credits to ensure efficient data transmission. The trigger time of this process is random.
[0074] Through the above embodiments, firstly, a credit refresh mechanism is used to provide a method for each routing node in the network to dynamically adjust the credit allocation, so as to complete the real-time path planning according to the node credit; through the real-time monitoring and adjustment of the credit, the packet loss caused by insufficient cache can be avoided, and at the same time, through the adaptability of the software, the routing path can be optimized according to the dynamic changes of the network, congestion can be reduced, and the bandwidth and performance of the overall network can be improved.
[0075] Optionally, the switch distributor is further used to: receive multiple path calculation results sent by the routing path calculation unit, wherein the multiple path calculation results are used to indicate that multiple second input units correspond to the first output unit, and the multiple second input units include the first input unit; upon receiving the multiple allocation results sent by the virtual channel distributor, perform switch usage right arbitration on the multiple second input units to determine the order in which the multiple second input units obtain the switch usage right, wherein the multiple allocation results correspond one-to-one to the multiple second input units; and upon determining that the first input unit obtains the switch usage right, send the arbitration information to the first input unit and the cross switch matrix.
[0076] The switch distributor receives multiple path calculation results sent by the routing path calculation unit, thereby determining which input units need to send data packets through which output units; at the same time, after receiving multiple allocation results sent by the virtual channel distributor, it can determine which input units can start sending data packets; arbitrate the switch use rights for multiple second input units that need to use the same output unit and are ready to send data packets, decide the order in which these second input units send data packets, and send the obtained arbitration information to the first input unit (the second input unit that obtains the switch use right) and the switch cross matrix.
[0077] The switch distributor focuses on the packet transmission scheduling at the physical port level. It determines to which output unit the data packet of the input unit will be forwarded, and in which clock cycle it will be sent. In a routing node with multiple inputs and multiple outputs, there may be a situation where data packets from multiple input units want to be sent to the same output unit at the same time. At this time, the switch distributor is needed to arbitrate and schedule to prevent data packet collisions on the physical link. It is also responsible for ensuring that the data packets of each input unit can access the output unit fairly, and making decisions based on credit mechanisms and other scheduling strategies.
[0078] Optionally, the first input unit is also used to: upon receiving the arbitration information sent by the switch distributor, send the head data packet, the intermediate data packet and the tail data packet to the cross switch matrix, respectively, so as to send the head data packet, the intermediate data packet and the tail data packet to the first output unit, respectively, through the cross switch matrix.
[0079] After receiving the arbitration information sent by the switch distributor, the first input unit can determine that it can send data packets, and can then send the head data packet, the middle data packet and the tail data packet to the cross switch matrix respectively; thereby, the head data packet, the middle data packet and the tail data packet are sent to the first output unit respectively through the cross switch matrix.
[0080] In an exemplary embodiment, the cross switch matrix is further used to: upon receiving the arbitration information, receive the header data packet, the intermediate data packet and the tail data packet sent by the first input unit; establish a connection path between the first input unit and the first output unit; and send the header data packet, the intermediate data packet and the tail data packet to the first output unit respectively through the connection path.
[0081] The crossbar switch matrix is composed of multiple multiplexers (MUX), which is used to connect all input and output units of the routing node. In each clock cycle, the crossbar switch establishes a connection from the input unit to the output unit based on the signal of the switch distributor, allowing data packets to be transmitted from one port to another without being restricted by the physical connection. This process is dynamic, meaning that the connection can be changed in each clock cycle to adapt to the traffic needs of the network.
[0082] Specifically, when the head packet passes through the crossbar switch matrix, it will be directed to the correct output port according to the output port and virtual channel information assigned to it. At this time, if the middle packet and the tail packet follow, they will inherit the routing and virtual channel information of the head packet and transmit along the same path until they reach the final destination - the first output unit.
[0083] In the process of traversing the crossbar switch, the routing node is able to handle multiple data packets and transmit them simultaneously even if they are destined for different destinations. This parallel processing capability is a key feature in the design of routing nodes and can significantly improve the overall throughput and efficiency of the network. In addition, the design and operation of the crossbar switch matrix is also critical to avoid deadlock, reduce latency, and improve network quality of service.
[0084] Optionally, the routing node also includes: a software scheduling module, connected to the credit counters of multiple routing nodes, for counting the channel credits of the virtual channels of the multiple routing nodes, and when it is determined based on the multiple channel credits that network congestion occurs in the target virtual channel of the third routing node, the target virtual channel is expanded and the channel credit of the target virtual channel is updated, wherein the multiple routing nodes include the third routing node.
[0085] The software scheduling module adopts the sram mapping mechanism (taking 64B sram as an example). The mapping mechanism is shown in Table 1. "VC address" is the address data of different VC channels, and "address data" is a register corresponding to the VC channel, which is used to store the usage of different FIFOs. It stores an 8-bit data, which indicates the usage of FIFO7-FIFO0 in turn. "1" is used, and "0" is released. For example, 1000_0000 indicates that all FIFOs except FIFO7 are released. According to the software strategy, the virtual channel depth can be refreshed, corrected, and released in real time. At the same time, the usage of the virtual channel can also be obtained, and the most reasonable correction route can be inferred.
[0086] Table 1 SRAM mapping table
[0087]
[0088] The input unit and output unit may include multiple virtual channels, and each VC (virtual channel) has at least one independent hardware FIFO. Taking the input unit as an example, the input unit consists of an input buffer and related link control logic. The input buffer is constructed by FIFO units, and the buffer slots are organized into several VCs. The above relationship is as follows Figure 5 As shown. Assuming that buffer slot 0 belongs to router0, buffer slot 1 belongs to router1, and the data pressure of router0.VC0 is high, it can be refreshed through the software scheduling policy to expand the cache contained in VC from FIFO0 to FIFO0+FIFO1; assuming that buffer slot 1 is located in router1, it is a router that is occupied by more messages in the MESH-XY coordinates, and most routers transmit messages through VC1 (that is, network congestion occurs), then when the MESH network is enabled, the software scheduling policy configured in the software scheduling module is used to configure VC1 to include FIFO0+FIFO1; in addition, the FIFO occupied by VC can also be released through the software scheduling policy.
[0089] Through the software scheduling module of this embodiment, the depth and usage of VC can be adjusted in real time. For example, when it is detected that the data pressure of a certain VC is high, the FIFO depth contained in the VC can be increased to alleviate data congestion. In addition, the software scheduling module can also formulate the most reasonable path correction strategy (i.e., the above-mentioned route correction information) based on the usage of VC and network status information to ensure efficient transmission of data packets.
[0090] The following combination Figure 3 The structure of the routing node introduced in the above embodiment is further described. Figure 3 As shown, Figure 3The complete structure of the routing node proposed in this application is shown in FIG. , which mainly includes the following parts:
[0091] Input unit: The input unit is mainly responsible for receiving data from other nodes. It may include multiple virtual channels, and each VC (virtual channel) has at least one independent hardware FIFO. The input unit consists of an input buffer and related link control logic. The input buffer is built by FIFO units. The buffer slots are organized into several VCs. The above relationship is as follows Figure 5 As shown. Assuming that buffer slot 0 belongs to router0, buffer slot 1 belongs to router1, and the data pressure of router0.VC0 is high, the buffer contained in vc is refreshed through the software scheduling strategy, and the cache is expanded from FIFO0 to FIFO0+FIFO1; Assuming that buffer slot 1, located in router1, is a router that is occupied by more messages in the MESH-XY coordinates, and most routers transmit messages through VC1, when the mesh network is enabled, vc1 is configured to include fifo0+fifo1 through the software scheduling strategy; In addition, the fifo occupied by vc can be released by the software through the software scheduling strategy (sram).
[0092] Output unit: The output unit of each routing node maintains a credit counter to record the remaining credits of the input unit of each target routing node on the XY path. Because packets cannot be lost during the routing process, the credit mechanism is used to allow the superior to determine the available cache. When a data packet is sent from the output unit and successfully received and processed by the input unit of the target routing node, the target routing node returns a credit to the source routing node, and the output unit of the source routing node updates the credit register accordingly, increasing the credit count of the corresponding target routing node input unit. The output unit will decide which virtual channel to take data from next based on software scheduling strategies, such as round-robin scheduling or priority scheduling.
[0093] XY routing path calculator (i.e. the routing path calculation unit mentioned above): The routing calculator determines the next routing path for each data packet based on a predefined routing algorithm (such as XY routing or adaptive routing, etc.). This process usually depends on the destination address of the data packet and the current network conditions. The calculation is based on the destination location carried by the input message, and the fields of the message are the output port and output virtual channel generated by the data packet.
[0094] Software scheduling strategy (SRAM) module (i.e. the above-mentioned software scheduling module): adopts SRAM mapping mechanism (taking 64B SRAM as an example), the mapping mechanism is shown in Table 1, and according to the software strategy, the virtual channel depth can be refreshed, corrected, and released in real time. At the same time, the usage of the VC channel can also be obtained by the software end, and then the most reasonable correction route can be inferred.
[0095] Virtual Channel Credit Allocator (i.e. the above-mentioned virtual channel allocator): The virtual channel allocator is used to manage the use of virtual channels in the input unit. When a data packet is to be transferred from the virtual channel of an input unit to the virtual channel of another output unit, the virtual channel allocator is required to coordinate and allocate. When the switch allocator decides which input port's data packet to assign to a certain output port, it needs to consider the remaining credits of this output port. The switch allocator will only assign data packets to this output port when the output port has enough credits to receive new data packets. After the Routing Computation is completed, the head flit requests an output VC. The VC allocator collects requests from all input VCs and then assigns the output VC to the requesting input VC. It ensures that an output VC is assigned to at most one input VC, and each input VC is granted at most one output VC.
[0096] Switch distributor: The switch distributor is used to decide which data packets of different units will be distributed to different output units in the next clock cycle. It coordinates possible conflicts, for example, when multiple input units want to send data to the same output unit, and controls the Crossbar.
[0097] Crossbar switch matrix: Crossbar switches are generally implemented using multiple multiplexers. The control signals of these multiplexers are generated by switch distributors. The crossbar switch matrix is the core of the routing node. It connects all input units and output units. In each clock cycle, the connection between a specific input unit and an output unit is established or disconnected according to the decision of the switch distributor.
[0098] Optionally, based on the above-mentioned routing node, the embodiment of the present application provides a method for sending a data packet, the process of which is as follows: Figure 6 As shown, the following steps are included:
[0099] Step S602, receiving the first data packet through the first input unit;
[0100] Step S604: acquiring the data information carried by the first data packet through the routing path calculation unit, and performing routing path calculation on the first data packet according to the data information to determine the first output unit corresponding to the first data packet;
[0101] Step S606, performing switch use right arbitration on the first input unit according to the first output unit by the switch distributor;
[0102] Step S608, when the crossbar switch matrix receives the arbitration information sent by the switch distributor, transmitting the first data packet from the first input unit to the first output unit through the crossbar switch matrix;
[0103] Step S610: When the first output unit receives the first data packet, the first data packet is sent to the second input unit.
[0104] Through the above method, after receiving the first data packet, the data information carried by the first data packet is obtained through the routing path calculation unit, and the routing path calculation is performed according to the data information to determine the first output unit corresponding to the first data packet; then the switch distributor arbitrates the switch use right of the first input unit, and the obtained arbitration information is sent to the cross switch matrix; then the first data packet is transmitted from the first input unit to the first output unit through the cross switch matrix; finally, the first data packet is sent to the second input unit through the first output unit to complete the sending process of the first data packet; adopting the above scheme, based on the improvement strategy of combining software and hardware, a new routing node hardware structure is proposed, and based on the structure, an adaptive routing method is implemented, which can select a suitable routing route in combination with the real-time network status to ensure the transmission performance; thereby solving the problem in the related art that the traditional deterministic routing method cannot respond to dynamic network changes and the performance decreases rapidly when the network congestion increases.
[0105] Optionally, the embodiments of the present application are combined with Figure 7 The data flow process of the data packet within the above routing node is further explained, such as Figure 7 As shown in the figure, each data packet is split into two parts and runs on two pipelines. The first part is the head data packet, and the second part is the middle data packet and the tail data packet. Then the head data packet goes through BW (BufferWrite, buffer write stage), RC (Route Compute, route calculation), VA (VC (Virtual Channel) Allocation, virtual channel allocation), SA (Switch Allocation, switch allocation), ST (Switch Traversal, switch traversal stage), LT (Link Traversal, link traversal stage). The middle data packet and the tail data packet need to go through all stages except RC and VA.
[0106] The specific tasks of each stage are as follows:
[0107] BW: In this phase, the incoming packets or messages are temporarily stored in the input buffer. Each input port of the routing node has its own buffer to hold the incoming data. In the buffer write phase, the incoming data is written to the appropriate buffer based on the destination address of the packet.
[0108] RC: During the route calculation phase, the routing node determines one or more appropriate output ports for the incoming data packet. The routing decision is based on the destination address of the data packet and the current state of the network.
[0109] VA: Virtual Channel Allocation, Input VCs arbitrate for "output" VCs (Input VCs atnext router) Input VC arbitration virtual channels are used to provide multiple independent communication paths within a physical link. During the VC allocation phase, the routing node allocates input virtual channels to output virtual channels, as shown in Table 1. This process allows congestion management and provides improved performance by allowing packets to be transmitted simultaneously on different virtual channels.
[0110] SA: Input Port Arbitrates Output Port,In the switch allocation phase, the input ports of the routing nodes arbitrate access to the output ports. This arbitration process determines which input port can use which output port to transmit its data. The goal is to minimize contention and ensure fair access to network resources.
[0111] ST: In the switch traversal phase, packets are forwarded from input ports to output ports of routing nodes according to the switch assignment results. Following the routing path determined in the previous phase, packets are directed to their designated output ports.
[0112] LT: Finally, in the link traversal phase, the packet traverses the physical links connecting the routing nodes in the network. This phase involves the actual transmission of the packet over the links to reach its intended destination.
[0113] The pipeline process is described as follows:
[0114] 7.1. After the head flit (head packet) arrives at the input port, it is first decoded and buffered according to its input VC in the buffer write (BW) stage of the pipeline stage;
[0115] 7.2. The routing logic performs a routing calculation (RC) to determine the output port of the data packet (i.e., the first output port mentioned above);
[0116] 7.3, the head flit then arbitrates the VC corresponding to its output port in the VA stage (i.e., the input port VC at the next routing node);
[0117] 7.4. After successfully allocating the VC, the head flit enters the switch allocation (SA) phase, in which the switch input and output ports are arbitrated;
[0118] 7.5. After winning the output port, it then reads the flit from the buffer and enters the switch traversal (ST) phase, where it traverses the crossbar switch;
[0119] 7.6. Finally, the head flit is passed to the next routing node in the link traversal (LT) phase. The body (middle packet) and tail (tail packet) flits follow a similar path, except that they do not go through the RC and VA phases, but inherit the route and VC assigned by the head flit. When the tail flit leaves the routing node, it releases the VC reserved by the head flit;
[0120] 7.7. If out-of-order occurs in the LT stage, data aggregation is completed at the final node based on information such as dst, src, and id.
[0121] It should be noted that dst (destination): This refers to the destination of the data packet or message, that is, the address of the node or device where it will eventually arrive. In network routing, the routing node will determine the forwarding path of the data packet based on the dst address. src (source): This refers to the source of the data packet or message, that is, the address of the node or device that sends the data. The src address can be used to track the source of the data, and in some cases, help determine the return path or confirm data reception. id (identifier): This is a unique identifier used to identify a specific data packet or message. The id can help track data packets in the network and ensure that the order of data packets is correct, especially in systems that support out-of-order transmission. For example, the body and tail flits mentioned in this application can be transmitted out of order with the head flit, and finally converged at the target node. The id ensures that even if the flits are out of order during transmission, they can be correctly reassembled into the original message at the target routing node.
[0122] Optionally, the present application also provides another optional routing design scenario schematic diagram, such as Figure 8 As shown, the routing nodes and computing units are linked together through a mesh structure. Figure 8 The R part is the routing node, and the L part is the computing unit. That is, in this structure, the structure of the routing node itself is not changed, but a computing unit is designed for it to connect with it, and the above-mentioned routing path calculation, switch allocation and other calculation work are integrated in the computing unit to complete; thus, the structure of the routing node itself is retained.
[0123] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment 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 this understanding, the technical solution of the present application, 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, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0124] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0125] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0126] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0127] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0128] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0129] An embodiment of the present application further provides a computer program product, comprising a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program product, and when the computer program is executed by a processor, the steps of the method described in each embodiment of the present application are implemented.
[0130] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0131] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0132] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.
Claims
1. A routing node, characterized in that: include: A first input unit, configured to receive a first data packet, wherein the first input unit is an input unit of a first routing node; a routing path calculation unit, connected to the first input unit, and configured to obtain data information carried by the first data packet, and perform routing path calculation on the first data packet according to the data information, and determine a first output unit corresponding to the first data packet, wherein the data information is at least used to indicate a destination address of the first data packet, and the first output unit is an output unit of the first routing node; a switch distributor, connected to the first input unit and the routing path calculation unit, and configured to arbitrate the switch use right of the first input unit according to the first output unit; a cross switch matrix, connected to the switch distributor, the first input unit and the first output unit, and configured to transmit the first data packet from the first input unit to the first output unit upon receiving arbitration information sent by the switch distributor, wherein the arbitration information is used to instruct the first input unit to obtain a right to use a switch; The first output unit is configured to send the first data packet to a second input unit of a second routing node when the first data packet is received through the crossbar switch matrix, wherein the second routing node is a next-level routing node of the first routing node; The routing path calculation unit is connected to the adaptive routing unit, and is further used to: request target information from the adaptive routing unit, wherein the target information includes: input weight information, route correction information; if the target information is not requested, perform routing path calculation on the first data packet according to the destination address and the start address corresponding to the routing node, determine the next level routing node of the first data packet, and determine the first output unit in the routing node connected to the next level routing node; The routing path calculation unit is further used to: when the target information is requested, receive the data information sent by the first input unit and the multiple first channel credits sent by the first output unit, wherein the first output unit includes multiple fourth virtual channels, the multiple fourth virtual channels include the third virtual channel, the multiple first channel credits correspond to the multiple fourth virtual channels one by one, and the first channel credits include: message count R msg cnt , idle state count R idle cnt , slightly busy state count R wbusy cnt , busy state count R busy cnt and fault status count R bad ; In the case where the target information is the input weight information, a weighted operation is performed on multiple count values of the first channel credit according to the input weight information to obtain a first operation result, determine a first target virtual channel corresponding to a second operation result, and determine the first output unit where the first target virtual channel is located, wherein the second operation result is the largest among the multiple first operation results corresponding to the multiple fourth virtual channels, and the first target virtual channel is connected to the next-level routing node; In the case where the target information is the input weight information and the route correction information, determine a tag value corresponding to the route correction information , and determining the tag value The corresponding modified weight value W5 is used to modify the multiple count values and the mark value according to the input weight information and the modified weight value W5. Perform a weighted operation to obtain a third operation result, determine a second target virtual channel corresponding to the fourth operation result, and determine the first output unit where the second target virtual channel is located, wherein the fourth operation result is the largest among the multiple third operation results corresponding to the multiple fourth virtual channels, and the second target virtual channel is connected to the next-level routing node.
2. The routing node according to claim 1, characterized in that: The first input unit includes a plurality of first virtual channels, and a second virtual channel among the plurality of first virtual channels is used to: Splitting the first data packet into a header data packet, a middle data packet and a tail data packet, wherein the header data packet includes the data information, the middle data packet includes actual data of the first data packet, and the tail data packet is used to indicate a data end point of the first data packet; Decoding the header data packet to obtain the data information; The data information is sent to the routing path calculation unit to instruct the routing path calculation unit to perform routing path calculation for the first data packet according to the data information, and the data information is sent to the virtual channel allocator of the first routing node to instruct the virtual channel allocator to allocate a third virtual channel to the second virtual channel according to the data information, wherein the first output unit includes the third virtual channel, and the third virtual channel is used to send the first data packet from the first input unit to the first output unit.
3. The routing node according to claim 2, characterized in that: The virtual channel distributor is connected to the first input unit, the first output unit and the switch distributor, and is used to: receiving a plurality of first channel credits sent by the first output unit, wherein the first output unit includes a plurality of fourth virtual channels, the plurality of fourth virtual channels include the third virtual channel, the plurality of first channel credits correspond to the plurality of fourth virtual channels one by one, and the plurality of first channel credits are used to indicate idle resources of the plurality of fourth virtual channels; receiving a plurality of the data information sent by a plurality of fifth virtual channels, wherein the plurality of first virtual channels include the plurality of fifth virtual channels, and the plurality of fifth virtual channels are all waiting to send data packets to the third virtual channel; The third virtual channel is allocated to the second virtual channel according to the second channel credit of the third virtual channel and the channel requirement information in the plurality of data information, and if the allocation is successful, the allocation result is sent to the switch distributor to instruct the switch distributor to start arbitrating the switch usage rights for the first input unit, wherein the channel requirement information is used to indicate the virtual channel size required for the first data packet.
4. The routing node according to claim 3, characterized in that: The first output unit further includes: a credit counter connected to the second input unit, the routing path calculation unit and the virtual channel distributor, and used for updating the third channel credits of the plurality of sixth virtual channels of the second input unit when the second input unit successfully receives the second data packet, obtaining the plurality of first channel credits, and sending the plurality of first channel credits to the routing path calculation unit and the virtual channel distributor, wherein the second data packet is the previous data packet sent by the first output unit.
5. The routing node according to claim 4, characterized in that: The first output unit is further used for: When the first data packet is received, the head data packet, the middle data packet and the tail data packet are sent to the second input unit respectively; When it is determined that the tail data packet is sent successfully, the credit counter is updated.
6. The routing node according to claim 3, characterized in that: The switch distributor is also used for: receiving a plurality of path calculation results sent by the routing path calculation unit, wherein the plurality of path calculation results are used to indicate that a plurality of second input units correspond to the first output unit, and the plurality of second input units include the first input unit; When receiving a plurality of the allocation results sent by the virtual channel distributor, performing switch use right arbitration on the plurality of second input units to determine the order in which the plurality of second input units obtain the switch use right, wherein the plurality of the allocation results correspond one-to-one to the plurality of second input units; In the case where it is determined that the first input unit obtains the right to use the switch, the arbitration information is sent to the first input unit and the crossbar switch matrix.
7. The routing node according to claim 6, characterized in that: The first input unit is further used for: Upon receiving the arbitration information sent by the switch distributor, the head data packet, the middle data packet and the tail data packet are respectively sent to the cross switch matrix, so as to send the head data packet, the middle data packet and the tail data packet to the first output unit through the cross switch matrix.
8. The routing node according to claim 7, characterized in that: The crossbar switch matrix is further used for: In case of receiving the arbitration information, receiving the head data packet, the middle data packet and the tail data packet sent by the first input unit; Establishing a connection path between the first input unit and the first output unit; The head data packet, the middle data packet and the tail data packet are respectively sent to the first output unit through the connection path.
9. The routing node according to any one of claims 1 to 8, characterized in that: The routing node also includes: A software scheduling module is connected to the credit counters of multiple routing nodes and is used to count the channel credits of the virtual channels of the multiple routing nodes. When it is determined based on the multiple channel credits that the target virtual channel of the third routing node has network congestion, the target virtual channel is expanded and the channel credit of the target virtual channel is updated, wherein the multiple routing nodes include the third routing node.
10. A method for sending a data packet, characterized in that: A routing node applied to any one of claims 1 to 9, include: receiving the first data packet through the first input unit; Acquire the data information carried by the first data packet through the routing path calculation unit, and perform routing path calculation on the first data packet according to the data information to determine the first output unit corresponding to the first data packet; Performing switch use right arbitration on the first input unit according to the first output unit by the switch distributor; In a case where the crossbar switch matrix receives the arbitration information sent by the switch distributor, transmitting the first data packet from the first input unit to the first output unit through the crossbar switch matrix; When the first output unit receives the first data packet, the first data packet is sent to the second input unit.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in claim 10 when executed by a processor.
12. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to claim 10 are implemented.
13. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to claim 10 are implemented.
Citation Information
Patent Citations
Adaptive router in NoC (network-on-chip) on basis of virtual output queue mechanism
CN105871742A
Routing device and routing method of network-on-chip
CN110620731A