Message processing method, device, electronic device and readable storage medium

By determining the target coordinates of the multicast message in the on-chip network and sending it to the routing node at the edge of the multicast area, and then performing bifurcated transmission within the area, the problem of low efficiency in multicast message transmission is solved and efficient multicast transmission is achieved.

CN120512394BActive Publication Date: 2025-10-03BEIJING INSTITUTE OF OPEN SOURCE CHIP
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510998731.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-18
Publication Date
2025-10-03
Estimated Expiration
2045-07-18

AI Technical Summary

Technical Problem

In the existing technology, how to efficiently realize multicast message transmission in on-chip networks has become a technical problem that needs to be solved urgently, especially when artificial intelligence data needs to be sent to multiple device nodes, the existing methods are inefficient.

Method used

The target coordinates of the multicast message are determined based on the node coordinates of the source routing node of the multicast message and the vertex coordinates of the multicast area, and the multicast message is sent to the routing node at the edge of the multicast area, and then forked and transmitted within the multicast area.

Benefits of technology

The overall transmission efficiency of multicast messages is improved, so that multicast messages can quickly reach the multicast area and be efficiently bifurcated and transmitted within the area, ensuring the overall efficiency of multicast.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120512394B_ABST
    Figure CN120512394B_ABST
Patent Text Reader

Abstract

Embodiments of the present invention provide a message processing method, device, electronic device, and readable storage medium, relating to the field of computer technology. In this method, based on the node coordinates of the source routing node of the multicast message and the vertex coordinates of the multicast area in the multicast message, the target coordinates are determined for the multicast message; the routing node indicated by the target coordinates is a multicast routing node located at the boundary of the multicast area. According to the target coordinates, the multicast message is sent to the multicast routing node indicated by the target coordinates. For any multicast routing node in the multicast area, if a multicast message is received, the multicast message is sent to the connected device node and the connected multicast routing node. In this way, the overall efficiency of multicasting the multicast message can be ensured to a certain extent, thereby achieving efficient multicasting.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of computer technology, and in particular to a message processing method, device, electronic device, and readable storage medium. Background Art

[0002] The routing nodes of the on-chip network are connected to each other, and each routing node is connected to at least one device node (i.e., processing unit). The message is sent through the routing nodes in the on-chip network and can eventually be sent to the device node indicated by the message.

[0003] In existing technologies, some data needs to be multicast in the form of messages. For example, artificial intelligence (AI) data needs to be sent to device nodes connected to multiple routing nodes. Therefore, how to efficiently implement multicast has become a technical problem that needs to be solved. Summary of the Invention

[0004] The embodiments of the present invention provide a message processing method, device, electronic device and readable storage medium, which can solve the problem of how to efficiently implement multicast.

[0005] In order to solve the above problems, an embodiment of the present invention discloses a message processing method applied to a network on chip, the method comprising:

[0006] Determining a target coordinate for the multicast message based on the node coordinates of the source routing node of the multicast message and the vertex coordinates of the multicast area in the multicast message; the routing node indicated by the target coordinate is a multicast routing node located at the area boundary of the multicast area;

[0007] Sending the multicast message to the multicast routing node indicated by the target coordinates according to the target coordinates;

[0008] For any multicast routing node in the multicast area, if the multicast message is received, the multicast message is sent to the connected device node and the connected multicast routing node.

[0009] On the other hand, an embodiment of the present invention discloses a message processing device, comprising:

[0010] a determination module configured to determine a target coordinate for the multicast message based on the node coordinates of the source routing node of the multicast message and the vertex coordinates of the multicast area in the multicast message; the routing node indicated by the target coordinates being a multicast routing node located at an area boundary in the multicast area;

[0011] A first sending module, configured to send the multicast message to the multicast routing node indicated by the target coordinates according to the target coordinates;

[0012] The second sending module is configured to send the multicast message to the connected device node and the connected multicast routing node if any multicast routing node in the multicast area receives the multicast message.

[0013] On the other hand, an embodiment of the present invention discloses an electronic device, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other through the communication bus; the memory is used to store executable instructions, and the executable instructions enable the processor to execute the aforementioned method.

[0014] An embodiment of the present invention further discloses a readable storage medium having executable instructions stored thereon. When executed by one or more processors, the processors are enabled to execute the method described above.

[0015] Embodiments of the present invention have the following advantages: In the message processing method provided by the embodiments of the present invention, the target coordinates for the multicast message are determined based on the node coordinates of the source routing node of the multicast message and the vertex coordinates of the multicast area in the multicast message; the routing node indicated by the target coordinates is a multicast routing node located at the area boundary of the multicast area. The multicast message is sent to the multicast routing node indicated by the target coordinates according to the target coordinates. Upon receiving a multicast message, any multicast routing node in the multicast area sends the multicast message to the connected device node and the connected multicast routing node. In this way, the multicast message is first sent to the multicast routing node located at the area boundary of the multicast area according to the target coordinates, allowing the multicast message to quickly reach the multicast area. Starting from this multicast routing node, the multicast routing nodes in the multicast area corresponding to the multicast message then transmit the multicast message in a forwarded manner within the multicast area. This ensures the overall efficiency of multicasting the multicast message to a certain extent, thereby achieving efficient multicasting. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments of the present invention. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0017] Figure 1 is a schematic diagram of a multicast area shown in an embodiment of the present invention;

[0018] Figure 2 This is a flowchart of a message processing method provided by an embodiment of the present invention;

[0019] Figure 3is another schematic diagram of a multicast area according to an embodiment of the present invention;

[0020] Figure 4 is a schematic diagram of a source routing node provided by an embodiment of the present invention;

[0021] Figure 5 This is a target direction diagram of a target node provided by an embodiment of the present invention;

[0022] Figure 6 This is a schematic diagram of a two-round multicast transmission provided by an embodiment of the present invention;

[0023] Figure 7 is another transmission diagram of two-round multicast provided by an embodiment of the present invention;

[0024] Figure 8 This is a schematic diagram of message transmission provided by an embodiment of the present invention;

[0025] Figure 9 This is a block diagram of a message processing device provided by an embodiment of the present invention;

[0026] Figure 10 It is a structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0027] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0028] First, an application scenario involved in an embodiment of the present invention is described. With the continuous development of AI services, more and more AI data is generated, and AI data needs to be multicast in the form of messages. Among them, AI data can be data that needs to be multiplexed in deep learning, network models, and neural network algorithms. Multicast refers to the transmission of messages of the same data from a source routing node to a group of device nodes connected to a specific routing node. Messages that need to be multicast are multicast messages, and messages that only need to be transmitted to device nodes connected to a specific routing node are unicast messages.

[0029] A network on chip (NoC) interconnects processing elements (PEs) through routing nodes according to a topology (topo). In one implementation, when building a NoC for a multi-core processor system, the Coherent Hub Interconnect (CHI) protocol can be used to create a coherently interconnected NoC. The topology represents the connectivity between nodes in the NoC and determines the physical layout and connections of nodes and channels within the NoC. For example, the NoC can use a mesh topology (MESH). Routing nodes, as basic components of the NoC, can be used for data storage and transmission. Routing nodes, also known as routers, consist of routing buffers and routing arbiters. The routing buffer is a logical block that temporarily stores packets in the routing hardware. The routing arbiter is a logical block that determines which packet from multiple data channels is granted an output channel according to specific rules. In other words, the routing arbiter determines which routing direction can send a packet, i.e., which packet should be sent. Specifically, the routing nodes in the MESH network are arranged in rows (X-axis dimension) and columns (Y-axis dimension). Each routing node is connected to the routing nodes adjacent to it in the routing node direction: above (north), below (south), left (west), and right (east), as well as to the device nodes in the device node direction.

[0030] For a multicast message, the routing nodes connected to the destination device node of the multicast message constitute a multicast area, and the routing nodes in the multicast area are multicast routing nodes. Figure 1 FIG. 1 is a schematic diagram of a multicast area shown in an embodiment of the present invention. Figure 1 As shown, assuming that the multicast message needs to be sent to the device nodes connected to the routing nodes S20, S21, S22, S26, S27 and S28, then the areas where S20, S21, S22, S26, S27 and S28 are located (i.e. Figure 1 The dotted line portion is the multicast area corresponding to the multicast message, and S20, S21, S22, S26, S27, and S28 are multicast routing nodes. The message processing method provided by the embodiment of the present invention is described in detail below.

[0031] Reference Figure 2 , shows a flow chart of the steps of a message processing method provided by an embodiment of the present invention, which can be applied to on-chip networks, such as Figure 2 As shown, the method may specifically include the following steps:

[0032] Step 101: Determine target coordinates for a multicast message based on the node coordinates of a source routing node of the multicast message and the vertex coordinates of a multicast area in the multicast message; the routing node indicated by the target coordinates is a multicast routing node located at an area boundary in the multicast area.

[0033] Step 102: Send the multicast message to the multicast routing node indicated by the target coordinates according to the target coordinates.

[0034] Step 103: For any multicast routing node in the multicast area, if the multicast message is received, the multicast message is sent to the connected device node and the connected multicast routing node.

[0035] In embodiments of the present invention, whether a message is a multicast message can be identified based on the multicast domain (broadcast) field in the message. For example, when the multicast domain field is a first flag, the message is determined to be a multicast message; when the multicast domain field is a second flag, the message is determined to be a unicast message. For example, the first flag can be 1, and the second flag can be 0. Any multicast message in a network on chip can be processed using the message processing method provided in embodiments of the present invention.

[0036] Routing refers to the process of transmitting a data packet from a source device node to a destination device node. The source processing unit can be the starting point of the message, and the destination device node can be the destination point of the message, that is, the message ultimately needs to be transmitted to the destination device node. The source routing node is the routing node connected to the source device node of the message, and the destination routing node is the routing node connected to the destination device node of the data packet. For multicast messages, the destination routing nodes are all multicast routing nodes in the multicast area corresponding to the multicast message, and the destination device node is the device node connected to all multicast routing nodes.

[0037] The vertex coordinates of the multicast area in a multicast message are used to indicate the routing nodes located at the vertices of the multicast area corresponding to the multicast message. In this embodiment of the present invention, the multicast area is a rectangular area. A vertex coordinate field is added to the multicast message to record the vertex coordinate information of the multicast area in the multicast message. Thus, based on the vertex coordinates of the multicast area, the multicast area corresponding to the multicast message can be determined.

[0038] The node coordinates of a routing node are the coordinates of the routing node in the on-chip network. In an embodiment of the present invention, a reference coordinate system can be constructed in advance in the on-chip network to determine a coordinate in the reference coordinate system for each routing node in the on-chip network. For example, an X-axis is established along the row direction in the on-chip network, and a Y-axis is established along the column direction in the on-chip network. The routing node in the lower left corner is selected as the origin, and accordingly, the coordinates of the routing node in the lower left corner in the reference coordinate system are (0,0). For any coordinate axis, starting from the routing node at the origin, for any other routing node, the other routing node is the nth routing node in the direction of the coordinate axis, that is, the value of the other routing node corresponding to the coordinate axis. For example, using the above Figure 1 For example, S1 is the first routing node in the X-axis direction and the zeroth routing node in the Y-axis direction, and its coordinates are (1, 0). The vertex coordinates of the multicast area in the multicast message can be used to indicate the above S26, S20, S28, and S22.

[0039] Multicast routing nodes in a multicast area can be divided into multicast routing nodes located at the area boundary (referred to as boundary routing nodes for short) and non-boundary routing nodes. If the number of boundary routing nodes included in the multicast area in the X-axis direction and the Y-axis direction is not less than 3, the multicast area includes boundary routing nodes and non-boundary routing nodes. Otherwise, the multicast area only includes boundary routing nodes. Figure 1 For example, the multicast area only includes border routing nodes. Figure 3 FIG. 1 is another schematic diagram of a multicast area shown in an embodiment of the present invention. Figure 3 As shown, the multicast area within the dotted box includes border routing nodes and non-border routing nodes (i.e. Figure 3 S20 in the ).

[0040] Among them, the multicast routing node indicated by the target coordinates is a routing node on the boundary of the multicast area corresponding to the multicast message. In an embodiment of the present invention, for any multicast message, the target coordinates are first determined for the multicast message. Sending the multicast message to the multicast routing node indicated by the target coordinates is equivalent to first transmitting the multicast message to a routing node on the boundary of the multicast area corresponding to the multicast message. This process can be regarded as one round of multicast phase. Then, a second round of multicast phase can be performed from the multicast routing node indicated by the target coordinates, that is, executing the above-mentioned step 103, and performing bifurcated propagation within the multicast area. Specifically, the multicast routing node indicated by the target coordinates is called a relay node, which is equivalent to the relay node in the multicast area corresponding to the multicast message being the first to receive the multicast message. Accordingly, the relay node sends the multicast message to the connected device node and the connected multicast routing node. In this way, other multicast routing nodes in the multicast area also receive the multicast message. Correspondingly, when other multicast routing nodes receive the multicast message, they will also execute the operation of sending the multicast message to the connected device nodes and the connected multicast routing nodes, and finally all the device nodes connected to each multicast routing node in the multicast area will receive the multicast message.

[0041] Compared to directly copying a multicast message at the source routing node, the multiple copied multicast messages are sent to multiple multicast routing nodes in the multicast area, so that these multiple multicast routing nodes can send the multicast message to the connected device nodes. In this embodiment of the present invention, the transmission process from the source routing node to the multicast routing node indicated by the target coordinates is equivalent to transmitting the multicast message as a unicast message, reusing the path between the source routing node and the multicast routing node indicated by the target coordinates, so that the multicast message can quickly reach the multicast area. Therefore, the overall efficiency of multicasting the multicast message can be improved to a certain extent.

[0042] In summary, in the message processing method provided by the embodiment of the present invention, the target coordinates are determined for the multicast message based on the node coordinates of the source routing node of the multicast message and the vertex coordinates of the multicast area in the multicast message; the routing node indicated by the target coordinates is the multicast routing node located at the area boundary in the multicast area. According to the target coordinates, the multicast message is sent to the multicast routing node indicated by the target coordinates. For any multicast routing node in the multicast area, if a multicast message is received, the multicast message is sent to the connected device node and the connected multicast routing node. In this way, the multicast message is first sent to the multicast routing node located at the area boundary in the multicast area according to the target coordinates, so that the multicast message can quickly reach the multicast area. Starting from the multicast routing node, the multicast routing nodes in the multicast area corresponding to the multicast message partially cross-transmit the multicast message within the multicast area. In this way, the overall efficiency of multicasting the multicast message can be ensured to a certain extent, thereby achieving efficient multicasting.

[0043] Optionally, the step of determining the target coordinates for the multicast message based on the node coordinates of the source routing node of the multicast message and the vertex coordinates of the multicast area in the multicast message may specifically include:

[0044] Step 1011: If the source routing node is outside the multicast area, determine the target coordinates for the multicast message based on the node coordinates and the vertex coordinates.

[0045] Correspondingly, an embodiment of the present invention may also include: step A1, if the source routing node is located in the multicast area, then executing the step of sending the multicast message to the connected device node and the connected multicast routing node if any multicast routing node in the multicast area receives the multicast message.

[0046] In an embodiment of the present invention, a multicast message may be a data (DATA) message. The multicast message includes a multicast area segment, which is the aforementioned vertex coordinate segment. The content of the multicast area segment can be parsed and extracted to obtain the vertex coordinates of the multicast area in the multicast message. Specifically, the node coordinates of the source routing node include a first coordinate value and a second coordinate value, and the vertex coordinates of the multicast area in the multicast message include a minimum first coordinate value, a maximum first coordinate value, a minimum second coordinate value, and a maximum second coordinate value. The first coordinate value and the second coordinate value each represent a coordinate value on a coordinate axis. For example, the first coordinate value is the coordinate value of the X-axis (referred to as the X-coordinate value), and the second coordinate value is the coordinate value of the Y-axis (referred to as the Y-coordinate value). Alternatively, the second coordinate value is the X-coordinate value, and the first coordinate value is the Y-coordinate value. Exemplarily, Xmin, Xmax, Ymin, and Ymax represent the minimum first coordinate value, the maximum first coordinate value, the minimum second coordinate value, and the maximum second coordinate value, respectively. The multicast area segment may include (Xmin, Ymin) and (Xmax, Ymax), namely, the node coordinates of the lower left vertex and the node coordinates of the upper right vertex. The software in the source device node of the multicast message can determine the vertex coordinates of the multicast area of ​​the multicast message based on the task mapping. For example, the multicast area is determined based on the node coordinates of the routing node connected to the destination processing unit defined in the task, and the vertex coordinates of the multicast area are obtained. Exemplarily, the minimum X coordinate value, the maximum X coordinate value, the minimum Y coordinate axis, and the maximum Y coordinate value of the node coordinates defined in the task can be obtained. Then, the processor sends the multicast message carrying the vertex coordinates to the source routing node.

[0047] Xsrc represents the first coordinate value of the node coordinates of the source routing node, and Ysrc represents the second coordinate value of the node coordinates of the source routing node. Xsrc can be compared with Xmin and Xmax, and Ysrc can be compared with Ymin and Ymax. If Xmin≤Xsrc≤Xmax and Ymin≤Ysr≤Ymax, then the source routing node is determined to be located in the multicast area. Otherwise, the source routing node is determined not to be located in the multicast area, that is, the source routing node is located outside the multicast area.

[0048] Furthermore, if the source routing node is located in the multicast area, the second round of multicast can be started directly, that is, the above step 103 is executed. If the source routing node is located outside the multicast area, the target coordinates can be determined first, and a first round of multicast can be performed.

[0049] In an embodiment of the present invention, when the source routing node is located in the multicast area, it directly enters the second-round multicast stage, that is, for any multicast routing node in the multicast area, if a multicast message is received, the step of sending the multicast message to the connected device nodes and the connected multicast routing nodes is executed. When the source routing node is located outside the multicast area, the target coordinates are determined for the multicast message based on the node coordinates and the vertex coordinates. In this way, unnecessary operations can be avoided, and the problem of waste of processing resources can be avoided.

[0050] Optionally, the step of determining the target coordinates for the multicast message based on the node coordinates and the vertex coordinates may specifically include:

[0051] Step 1011a: Select a first target value from the first coordinate value, the minimum first coordinate value, and the maximum first coordinate value; the first target value does not exceed the minimum first coordinate value and the maximum first coordinate value.

[0052] Step 1011b: Select a second target value from the second coordinate value, the minimum second coordinate value, and the maximum second coordinate value; the second target value does not exceed the minimum second coordinate value and the maximum second coordinate value.

[0053] Step 1011c: Determine the first target value and the second target value as the target coordinates.

[0054] In an embodiment of the present invention, a first interval may be formed based on the minimum first coordinate value and the maximum first coordinate value. The first interval may be [Xmin, Xmax]. Based on the first coordinate value, the coordinate value closest to the first coordinate value is selected from [Xmin, Xmax]. Specifically, when Xsrc <= Xmin, Xmin is selected as the first target value. When Xsrc >= Xmax, Xmax is selected as the first target value. When Xmin < Xsrc < Xmax, Xsrc is selected as the first target value.

[0055] A second interval can be formed based on the minimum second coordinate value and the maximum second coordinate value. The second interval can be [Ymin, Ymax]. Based on the second coordinate value, the coordinate value closest to the second coordinate value is selected from [Ymin, Ymax]. Specifically, when Ysrc <= Ymin, Ymin is selected as the second target value. When Ysrc >= Ymax, Ymax is selected as the second target value. When Ymin < Ysrc < Ymax, Ysrc is selected as the second target value. In this way, it is equivalent to selecting the coordinate value closest to the source routing node from the X-axis dimension and the Y-axis dimension respectively, so that the multicast routing node represented by the target coordinate is the closest to the source routing node of the multicast packet, thereby ensuring the transmission efficiency between the source routing node and the multicast routing node represented by the target coordinate.

[0056] Among them, the first target value is the X coordinate value in the target coordinate, and the second target value is the Y coordinate value in the target coordinate. Figure 4 It is a schematic diagram of a source routing node provided by an embodiment of the present invention. As Figure 4 shown, if the source routing node is located in area 1, then the source routing node satisfies Xsrc <= Xmin and Ysrc > Ymax. Therefore, the target coordinate determined by the source routing node located in area 1 for the multicast packet is (Xmin, Ymax). If the source routing node is located in area 2, then the source routing node satisfies Xmin < Xsrc < Xmax and Ysrc > Ymax. Therefore, the target coordinate determined by the source routing node located in area 2 for the multicast packet is (Xsrc, Ymax). If the source routing node is located in area 3, then the source routing node satisfies Xsrc >= Xmax and Ysrc >= Ymax. Therefore, the target coordinate determined by the source routing node located in area 3 for the multicast packet is (Xmax, Ymax).

[0057] If the source routing node is located in area 4, then the source routing node satisfies Xsrc <= Xmin and Ymin < Ysrc < Ymax. Therefore, the target coordinate determined by the source routing node located in area 4 for the multicast packet is (Xmin, Ysrc). If the source routing node is located in area 5 (i.e., Figure 4 the dashed box area in), then the second-round multicast stage is directly started.

[0058] If the source routing node is located in area 6, then the source routing node satisfies Xsrc >= Xmax and Ymin < Ysrc < Ymax. Therefore, the target coordinates determined by the source routing node located in area 6 for the multicast packet are (Xmax, Ysrc). If the source routing node is located in area 7, then the source routing node satisfies Xsrc <= Xmin and Ysrc <= Ymin. Therefore, the target coordinates determined by the source routing node located in area 7 for the multicast packet are (Xmin, Ymin). If the source routing node is located in area 8, then the source routing node satisfies Xmin < Xsrc < Xmax and Ysrc <= Ymin. Therefore, the target coordinates determined by the source routing node located in area 8 for the multicast packet are (Xsrc, Ymin). If the source routing node is located in area 9, then the source routing node satisfies Xsrc >= Xmax and Ysrc <= Ymin. Therefore, the target coordinates determined by the source routing node located in area 9 for the multicast packet are (Xmax, Ymin).

[0059] In an embodiment of the present invention, a first target value is selected from the first coordinate value, the minimum first coordinate value, and the maximum first coordinate value; the first target value does not exceed the minimum first coordinate value and the maximum first coordinate value. A second target value is selected from the second coordinate value, the minimum second coordinate value, and the maximum second coordinate value; the second target value does not exceed the minimum second coordinate value and the maximum second coordinate value. The first target value and the second target value are determined as the target coordinates. In this way, the operation of determining the target coordinates for the multicast packet can be achieved through coordinate comparison. Therefore, the processing efficiency can be ensured to a certain extent.

[0060] Optionally, the step of sending the multicast packet to the multicast routing node indicated by the target coordinates may specifically include:

[0061] Step 1021: Set the target address field segment in the multicast packet to the target coordinates.

[0062] Step 1022: Send the multicast packet to the multicast routing node indicated by the target coordinates according to a preset routing algorithm.

[0063] In an embodiment of the present invention, the target address field segment may be a Target Identifier (Tgtid) field segment. The source routing node can modify the value of the target address field segment in the multicast packet to the target coordinates to ensure that the multicast packet is finally transmitted to the target coordinates after transmission, that is, sent to the multicast routing node indicated by the target coordinates.

[0064] A routing node can determine the next routing node for a data packet based on a preset routing algorithm, wherein the routing algorithm determines the transmission rules for data packets in the on-chip network and determines the transmission route of the data packet. Furthermore, the preset routing algorithm can be pre-set. In an embodiment of the present invention, the preset routing algorithm can be a deterministic routing algorithm, such as an XY routing algorithm or a YX routing algorithm. In a deterministic routing algorithm, the path of a message from the source routing node to the destination routing node is fixed. In the XY routing algorithm, the message is first transmitted along the X-axis and then along the Y-axis. In the YX routing algorithm, the message is first transmitted along the Y-axis and then along the X-axis. Specifically, in the XY routing algorithm, the message is first transmitted along the X-axis until it reaches the column where the destination routing node is located, and then transmitted along the Y-axis until it reaches the destination routing node. In the YX routing algorithm, the message is first transmitted along the Y-axis until it reaches the row where the destination routing node is located, and then transmitted along the X-axis until it reaches the destination routing node.

[0065] Because deterministic routing algorithms are easy to implement in hardware, messages do not need to dynamically select paths during transmission, resulting in low path selection overhead. Therefore, in embodiments of the present invention, using a deterministic routing algorithm to send multicast messages to the multicast routing node indicated by the target coordinates can reduce transmission delays and lower development costs and complexity.

[0066] In an embodiment of the present invention, steps 101 and 1021 can be performed by the source routing node of the multicast message. In step 1022, the next routing node can be selected based on the remapped Tgtid of the multicast message according to a preset routing algorithm, and the message can be sent to the next routing node. Step 1022 can be implemented by the source routing node and an intermediate routing node between the source routing node and the multicast routing node indicated by the target coordinates. The intermediate routing node is selected using a preset routing algorithm. Assuming the preset routing algorithm is an XY routing algorithm, the source routing node is S6 at (0, 1), and the target coordinates are S13 at (1, 2), then the intermediate routing node may include S7. In an embodiment of the present invention, the source routing node determines the target coordinates for the multicast message and remaps the Tgtid for the multicast message. Then, based on the remapped Tgtid of the multicast message according to the preset routing algorithm, the next routing node is selected and the message is sent to the next routing node. The intermediate routing node selects the next routing node based on the Tgtid after the multicast message is remapped according to the preset routing algorithm and sends it to the next routing node until it reaches the multicast routing node indicated by the target coordinates.

[0067] For source routing nodes in area 1, the Tgtid in the multicast message is remapped to (Xmin, Ymax). The multicast message is then transmitted to the multicast routing node at (Xmin, Ymax) using the XY routing algorithm. For source routing nodes in area 2, the Tgtid in the multicast message is remapped to (Xsrc, Ymax). The multicast message is then transmitted to the multicast routing node at (Xsrc, Ymax) using the XY routing algorithm. For source routing nodes in area 3, the Tgtid in the multicast message is remapped to (Xmax, Ymax). The multicast message is then transmitted to the multicast routing node at (Xmax, Ymax) using the XY routing algorithm. For source routing nodes in area 4, the Tgtid in the multicast message is remapped to (Xmin, Ysrc). The multicast message is then transmitted to the multicast routing node at (Xmin, Ysrc) using the XY routing algorithm. For source routing nodes in area 5, no Tgtid remapping is performed, and the second multicast round begins directly. For the source routing node in area 6, the Tgtid in the multicast message is remapped to (Xmax, Ysrc). The multicast message is then transmitted to the multicast routing node at (Xmax, Ysrc) based on the XY routing algorithm. For the source routing node in area 7, the Tgtid in the multicast message is remapped to (Xmin, Ymin). The multicast message is then transmitted to the multicast routing node at (Xmin, Ymin) based on the XY routing algorithm. For the source routing node in area 8, the Tgtid in the multicast message is remapped to (Xsrc, Ymin). The multicast message is then transmitted to the multicast routing node at (Xsrc, Ymin) based on the XY routing algorithm. For the source routing node in area 9, the Tgtid in the multicast message is remapped to (Xmax, Ymin). The multicast message is then transmitted to the multicast routing node at (Xmax, Ymin) based on the XY routing algorithm.

[0068] In one implementation, for any routing node in the on-chip network, whether the routing node belongs to the multicast zone corresponding to the multicast message can be determined based on the routing node's coordinates and the (Xmin, Ymin) and (Xmax, Ymax) values ​​in the multicast zone field of the multicast message. For example, if the node coordinates of the routing node are represented by (XID, YID), and if Xmin ≤ XID ≤ Xmax and Ymin ≤ YID ≤ Ymax, the routing node is determined to belong to the multicast zone corresponding to the multicast message. Otherwise, the routing node is determined not to belong to the multicast zone corresponding to the multicast message.

[0069] If it does not belong to, then when the node coordinates of the routing node are the same as the source node coordinates of the multicast message (indicating that the routing node is the source routing node of the multicast message), the transmission strategy in a round of multicast phase is adopted: execute the above steps 101 and 1021 to remap the Tgtid for the multicast message. Then, according to the preset routing algorithm, based on the Tgtid after the multicast message is remapped, the next routing node is selected and sent to the next routing node. If it does not belong to, then when the node coordinates of the routing node are different from the source node coordinates of the multicast message, the transmission strategy in a round of multicast phase is adopted: according to the preset routing algorithm, based on the Tgtid after the multicast message is remapped, the next routing node is selected and sent to the next routing node, thereby realizing sending the multicast message to the multicast routing node indicated by the target coordinates according to the preset routing algorithm.

[0070] If so, if the node coordinates of the routing node are identical to the Tgtid of the multicast message (indicating that the routing node is a relay node), a second round of multicast begins within the multicast area corresponding to the multicast message. This uses the transmission strategy of the second round of multicast: the multicast message is replicated and sent to the connected device nodes and connected multicast routing nodes in the same manner. This coordinate comparison allows the routing node to determine the method used to transmit the multicast message, ensuring that the multicast message is transmitted in both the first and second rounds of multicast.

[0071] Optionally, in an embodiment of the present invention, a multicast message includes a multicast phase field, and the initial value of the multicast phase field may be a first specified value. The first specified value may be used to indicate that message transmission is performed according to a transmission strategy within a multicast phase. Sending the multicast message to the multicast routing node indicated by the target coordinates according to a preset routing algorithm may specifically include: when the multicast phase field in the multicast message is the first specified value, sending the multicast message to the multicast routing node indicated by the target coordinates according to the preset routing algorithm.

[0072] Accordingly, the embodiment of the present invention further includes: Step B1, after the multicast message is sent to the multicast routing node indicated by the target coordinates, modifying the multicast phase field in the multicast message to a second specified value.

[0073] Among them, the first specified value and the second specified value can be predefined. For example, the first specified value can be 0, and the second specified value can be 1. The first specified value can also be called a first-stage multicast identifier, and the second specified value can also be called a second-stage multicast identifier. In an embodiment of the present invention, after the multicast message is sent to the multicast routing node indicated by the target coordinates, it indicates that a round of multicast phase is over, and there is no need to send the multicast message to the multicast routing node indicated by the target coordinates according to the preset routing algorithm. Instead, it is necessary to start from the multicast routing node indicated by the target coordinates and transmit the message within the multicast area, that is, it is necessary to transmit the multicast message to the connected device node and the connected multicast routing node. Therefore, the multicast phase domain segment can be modified to the second specified value.

[0074] In an embodiment of the present invention, for any routing node in the on-chip network, the routing node's own coordinates can be compared with the target coordinates in the Tgtid field of the multicast message. If the coordinates match, the routing node is a relay node (i.e., the multicast routing node indicated by the target coordinates), and the multicast message is sent to the multicast routing node indicated by the target coordinates. Therefore, the multicast phase field in the multicast message can be modified from a first preset value to a second preset value.

[0075] If the two are inconsistent, it means that the multicast message is currently in a round of multicast phase. Accordingly, when the coordinates of the routing node itself are the same as the coordinates of the source node of the multicast message, the transmission strategy in the round of multicast phase can be adopted: execute the above steps 101 and 1021 to remap the Tgtid for the multicast message. Then, according to the preset routing algorithm, based on the Tgtid after the multicast message is remapped, the next routing node is selected and sent to the next routing node. When the node coordinates of the routing node are different from the coordinates of the source node of the multicast message, the transmission strategy in the round of multicast phase can be adopted: according to the preset routing algorithm, based on the Tgtid after the multicast message is remapped, the next routing node is selected and sent to the next routing node. It should be noted that for the source routing node located in area 5, the source routing node can be regarded as the relay node of the multicast message, and the source routing node directly modifies the multicast phase field in the multicast message from the first preset value to the second preset value to directly start the second round of multicast phase.

[0076] In an embodiment of the present invention, by maintaining the specific value of the multicast phase field, the routing node in the on-chip network can know which multicast phase the multicast message currently belongs to based on the multicast phase field in the received multicast message, that is, know which method is used to transmit the message, thereby improving the processing efficiency of the routing node to a certain extent. In an embodiment of the present invention, the multicast phase field is uniformly modified from the first preset value to the second preset value at the relay node, which can avoid the problem of setting multiple modification logics and affecting the chip frequency. Of course, in the case where the source routing node of the multicast message is located outside the multicast area, the method of having the previous node of the relay node modify the multicast phase field from the first preset value to the second preset value can also be adopted, and the implementation of the present invention does not limit this.

[0077] Optionally, the step of sending the multicast message to the connected device node and the connected multicast routing node specifically includes:

[0078] Step 1031: If the multicast routing node is a target node, the routing node direction of the connected routing node belonging to the multicast area is used as the target direction; the target node is the multicast routing node indicated by the target coordinates.

[0079] Step 1032: If the multicast routing node is not the target node, the optional direction in which the connected routing node belongs to the multicast area and whose coordinate axis priority is not higher than the coordinate axis priority of the receiving direction is used as the target direction; the optional direction is the routing node direction other than the receiving direction.

[0080] Step 1033: Send the multicast message to the connected device nodes in the device node direction, and send the multicast message to the connected multicast routing nodes in each target direction respectively.

[0081] The device node direction and routing node direction can be collectively referred to as the routing direction. The device node direction refers to the direction in which the routing node connects to the device node, and the routing node direction refers to the direction in which the routing node connects to other routing nodes. For example, routing node directions can include: east (E), south (S), west (W), and north (N). The device node direction can be represented as P.

[0082] Routing node directions: East (E) and West (W) belong to the X-axis, while routing node directions: South (S) and North (N) belong to the Y-axis. Routing node directions: East (E) and West (W) have an X-axis priority, while routing node directions: South (S) and North (N) have a Y-axis priority. When the on-chip network uses the XY routing algorithm as its default routing algorithm, the X-axis priority is greater than the Y-axis priority, meaning the X-axis priority is the highest priority. When the on-chip network uses the YX routing algorithm as its default routing algorithm, the Y-axis priority is greater than the X-axis priority, meaning the Y-axis priority is the highest priority. In an embodiment of the present invention, when a multicast routing node is not a target node, the receiving direction of the multicast message received by the multicast routing node is one of the routing node directions. Accordingly, based on the coordinate axis priority of that direction, a target direction, i.e., the routing node direction from which the multicast message is sent, can be selected for the multicast routing node.

[0083] Figure 5 The following is a schematic diagram of the target directions of a target node provided by an embodiment of the present invention. When the source routing node is located in region 1 and the target node is a multicast routing node at (Xmin, Ymax), the target directions are: east and south. When the source routing node is located in region 2 and the target node is a multicast routing node at (Xsrc, Ymax), the target directions are: east, west, and south. When the source routing node is located in region 3 and the target node is a multicast routing node at (Xmax, Ymax), the target directions are: west and south. When the source routing node is located in region 4 and the target node is a multicast routing node at (Xmin, Ysrc), the target directions are: east, north, and south. When the source routing node is located in region 5 and the target node is a multicast routing node at (Xsrc, Ysrc), the target directions are: east, west, north, and south. When the source routing node is located in region 6 and the target node is a multicast routing node at (Xmax, Ysrc), the target directions are: west, north, and south. When the source routing node is located in region 7 and the destination node is the multicast routing node at (Xmin, Ymin), the destination directions are: north, east. When the source routing node is located in region 8 and the destination node is the multicast routing node at (Xsrc, Ymin), the destination directions are: east, west, north. When the source routing node is located in region 9 and the destination node is the multicast routing node at (Xmax, Ymin), the destination directions are: north, west.

[0084] The following combination Figure 3The on-chip network and multicast zones shown in Figure 1 illustrate the multicast message transmission path between routing nodes. In the case where the source routing node is located in zone 1 and the destination node is the multicast routing node at (Xmin, Ymax), the destination node is S25. S25 can replicate the multicast message and send it to S26, S19, and the device nodes in the P direction of S25. Figure 6 This is a schematic diagram of a two-round multicast transmission provided by an embodiment of the present invention. Figure 6 As shown, when the on-chip network adopts the XY routing strategy, S25 sends a multicast message to S26 and S19, S26 sends a multicast message to S20 and S27, and S27 sends a multicast message to S21. S19, S20 and S21 send multicast messages to S13, S14 and S15 respectively. In this way, when non-target nodes in the multicast area transmit multicast messages, they also follow the XY routing algorithm adopted by the on-chip network and propagate along the XY path, thereby ensuring that the message can be transmitted correctly. Specifically, for S26, the receiving direction of S26 is west, and the optional direction in which the connected routing node belongs to the multicast area and the coordinate axis priority is not higher than the coordinate axis priority of the west direction is selected as the target direction. In this example, the coordinate axis priority of the receiving direction of S26 is the X-axis priority, and the available directions in which the connected routing node belongs to the multicast area are: east and south. The east direction's coordinate axis priority is the X-axis priority, and the south direction's coordinate axis priority is the Y-axis priority. Neither the east nor the south direction's coordinate axis priority is higher than the receiving direction's coordinate axis priority. Therefore, the east and south directions can be used as S26's target directions. S26 copies the message and sends it to S27, S20, and the device node in S26's P direction.

[0085] For S27, its receiving direction is west. In this example, its receiving direction has an X-axis priority, and the available direction for the connected routing node in the multicast zone is south. The south direction has a Y-axis priority, and its south direction priority is no higher than the receiving direction's. Therefore, south is selected as S27's target direction. After replicating the message, S27 sends the multicast message to S21 and the device nodes in S27's P direction.

[0086] For S19, S20, and S21, the receiving direction is the north direction, and the coordinate axis priority of the receiving direction is the Y-axis priority. The connected routing node belongs to the multicast area, and the directions of the routing nodes whose coordinate axis priority is not higher than the coordinate axis priority of the receiving direction are all: south direction. Therefore, S19, S20, and S21 can copy the message and then send the multicast message to the device nodes in their respective P directions, and S19 sends a multicast message to S13, S20 sends a multicast message to S14, and S21 sends a multicast message to S15. For S13, S14, and S15, there is no routing node direction whose connected routing node belongs to the multicast area, and whose coordinate axis priority is not higher than the coordinate axis priority of the receiving direction. Therefore, the target directions of S13, S14, and S15 are all empty. After S13, S14, and S15 copy the message, they send multicast messages to the device nodes connected in their respective P directions. In this way, the multicast message is sent to each device node connected to the multicast routing node within the multicast area.

[0087] Figure 7 This is another transmission diagram of two-round multicast provided by an embodiment of the present invention, such as Figure 7 As shown in the figure, when the on-chip network adopts the YX routing strategy, S25 sends a multicast message to S26 and S19, and S26 sends a multicast message to S27. S19 sends a multicast message to S20 and S13. S13 sends a multicast message to S14. S20 and S14 send multicast messages to S21 and S15, respectively. In this way, when non-target nodes in the multicast area transmit multicast messages, they also follow the YX routing algorithm adopted by the on-chip network and propagate along the YX path, thus ensuring that the message is correctly transmitted.

[0088] Specifically, for S26, the receiving direction of S26 is the west direction, the coordinate axis priority of the east direction is the X-axis priority, and the coordinate axis priority of the south direction is the Y-axis priority. Only the coordinate axis priority of the east direction is not higher than the coordinate axis priority of the receiving direction. Therefore, the east direction can be used as the target direction of S26. After S26 copies the message, it sends it to S27 and the device nodes in the P direction of S26. For S19, the receiving direction of S19 is the north direction, and the coordinate axis priority of the north direction is the Y-axis priority. The available directions connected to the multicast routing nodes belonging to the multicast area and with coordinate axis priorities not higher than the coordinate axis priority of the receiving direction are: east and south. Therefore, after S19 copies the message, it sends it to S20, S13 and the device nodes in the P direction of S19. After S20 copies the message, it sends the multicast message to S21 and the device nodes in the P direction of S20. After S13 copies the message, it sends the multicast message to S14 and the device nodes in the P direction of S13. After S14 copies the message, it sends a multicast message to S15 and the device nodes in S14's P direction. For S27, S21, and S15, there is no routing node direction whose connected routing node belongs to the multicast area and whose coordinate axis priority is not higher than the coordinate axis priority of the receiving direction. Therefore, the target direction of S27, S21, and S15 is empty. After S27, S21, and S15 copy the message, they send a multicast message to the device nodes connected in their respective P directions. In this way, the multicast message is sent to the device nodes connected to each multicast routing node in the multicast area.

[0089] Optionally, the steps of sending the multicast message to the connected device node in the device node direction, and sending the multicast message to the connected multicast routing nodes in each target direction, may specifically include:

[0090] Step 1033a: If the multicast routing node is the target node and the coordinate axis priority of the receiving direction is not the highest priority, the device node direction is used as the direction to be sent in a sending round, and the multicast message is sent to the nodes connected to the direction to be sent in the sending round; the multicast message sent by the connected device node is received, and all the target directions are used as the direction to be sent in a sending round, and the multicast message is sent to the nodes connected to each direction to be sent in the sending round.

[0091] Step 1033b: If the multicast routing node is not the target node, or if the multicast routing node is the target node and the coordinate axis priority of the receiving direction is the highest priority, then the device node direction and all the target directions are used as the to-be-sent directions of a sending round, and the multicast message is sent to the nodes connected to each of the to-be-sent directions within the sending round.

[0092] In an embodiment of the present invention, if the multicast routing node is not the target node, the device node direction and all target directions can be directly used as the to-be-sent directions of a transmission round, and multicast messages are sent to the nodes connected to each to-be-sent direction within the transmission round. If the multicast routing node is the target node, the transmission is performed in the manner of step 1033a or step 1033b based on the receiving direction of the target node.

[0093] In step 1033a, the direction of the device node is used as the direction to be sent in a sending round, and a multicast message is sent to the node connected to the direction to be sent within the sending round, that is, the target node receives the multicast message and sends it to the device node connected to the target node. Then, the target node can delete the multicast message cached locally at the target node after the end of this sending round. Then, the connected device node sends the multicast message to the target node, wherein the multicast message sent again by the connected device node can be set with a different transaction sequence number. The target node can write the multicast message into the receiving buffer corresponding to the device node direction. In this sending, the multicast message in the receiving buffer is copied, and then the multicast message is sent to the routing node direction of each target direction. Among them, different routing directions can correspond to a receiving buffer, and the receiving buffer can be a first-in-first-out queue. In embodiments of the present invention, the cache size (e.g., the L2 cache size) set for the device node connected to the target node can be no less than a preset threshold. This means that the cache size of the connected device node is sufficiently large to ensure that it can accommodate received multicast messages. This avoids the situation where the target node needs to rely on the device node to send a message when sending a multicast message to the connected device node, which in turn causes the target node to be unable to send a multicast message to the device node. This ensures that the device node can receive and retransmit the multicast message sent by the target node. Furthermore, in the event of a transmission failure, the device node can perform a retry operation.

[0094] In step 1033b, the multicast message can be directly forwarded without leaving the relay node. That is, the target node directly sends the multicast message to the device node and each target in a single transmission round. After sending the multicast message to the device node and each target, the multicast message locally cached by the target node can be deleted.

[0095] Specifically, for target nodes corresponding to regions 1, 2, 3, 7, 8, and 9, the coordinate axis for the receiving direction is the Y-axis. When a multicast message sent to the target node during a multicast round is sent toward a routing node on the X-axis, a YX path is formed. For target nodes corresponding to regions 4 and 6, the coordinate axis for the receiving direction is the X-axis. When a multicast message sent to the target node during a multicast round is sent toward a routing node on the X-axis, an XY path is formed.

[0096] Accordingly, when the on-chip network adopts the XY routing algorithm, message transmission in the on-chip network follows an XY path. The coordinate axis priority for the receiving direction of the target nodes corresponding to regions 4 and 6 is the highest priority, and accordingly, the method described in step 1033b can be used. The coordinate axis priority for the receiving direction of the target nodes corresponding to regions 1, 2, 3, 7, 8, and 9 is not the highest priority, and accordingly, the method described in step 1033a can be used. In step 1033a, the target node first copies the multicast message and sends it to the connected device node. The device node then sends the multicast message to the target node, which then sends the multicast message to the multicast routing nodes in each target direction. This interrupts the transmission path between the first multicast phase (i.e., the first multicast round) and the second multicast phase (i.e., the second multicast round), preventing the YX path formed during the transition from the first multicast round to the second multicast round from forming a deadlock path with the XY path in the on-chip network, thereby eliminating the potential deadlock in the multicast algorithm. Deadlock refers to the phenomenon that the entire on-chip network stops transmitting messages due to the occupation of interdependent resources.

[0097] When the on-chip network uses the YX routing algorithm, message transmission within the on-chip network follows the YX path. The coordinate axis priority for the receiving direction of the target nodes corresponding to regions 4 and 6 is not the highest priority. Accordingly, the method described in step 1033a can be used. This interrupts the transmission path between the first multicast phase (i.e., the first multicast round) and the second multicast phase (i.e., the second multicast round). This prevents the XY path formed during the transition from the first multicast round to the second multicast round from forming a deadlock with the YX path in the on-chip network, thereby eliminating the potential deadlock in the multicast algorithm. The coordinate axis priority for the receiving direction of the target nodes corresponding to regions 1, 2, 3, 7, 8, and 9 is the highest priority. Accordingly, the method described in step 1033b can be used.

[0098] It should be noted that, when step 1033a is used, the device node connected to the target node modifies the multicast phase field in the multicast message to the second specified value to indicate the entry into the second multicast phase. When step 1033b is used, the target node modifies the multicast phase field in the multicast message to the second specified value to indicate the entry into the second multicast phase.

[0099] Optionally, in the embodiment of the present invention, the following steps may also be included:

[0100] Step C1: For any of the sending rounds, set the multicast flag corresponding to each of the to-be-sent directions in the sending round to 1.

[0101] Step C2: After sending the multicast message to the node connected to the direction to be sent, set the multicast flag corresponding to the direction to be sent to 0.

[0102] Step C3: When all the multicast flag bits are 0, the multicast message is deleted from the multicast routing node.

[0103] In an embodiment of the present invention, a multicast flag bit can be configured in the flag field of the route information of the multicast routing node. The multicast flag field consists of five bits, one corresponding to each routing direction. For example, the multicast flag field can be [0(P), 0(S), 0(N), 0(W), 0(E)]. For example, in a multicast routing node using the XY routing algorithm, the target node is a multicast routing node at (Xmin, Ymax). After receiving a multicast message from a device node, the target node can use east and south as the transmission directions for a transmission round. Accordingly, the multicast flag field can be set to [0(P), 1(S), 0(N), 0(W), 1(E)]. After sending the multicast message to the east, the multicast flag field is updated to [0(P), 1(S), 0(N), 0(W), 0(E)]. After the multicast message is sent southward, the multicast flag field is updated to [0(P), 0(S), 0(N), 0(W), 0(E)]. At this time, the multicast message can be discharged, that is, deleted from the receiving buffer of the multicast routing node.

[0104] Specifically, an arbitration result can be obtained, which represents the direction of the routing node that receives arbitration priority. For example, if the east direction receives arbitration priority during the output direction competition, the multicast message can be sent to the east direction this time. The arbitration result is represented by [0(P), 0(S), 0(N), 0(W), 1(E)]. If the south direction receives arbitration priority, the multicast message can be sent to the east direction this time. The arbitration result is represented by [0(P), 1(S), 0(N), 0(W), 0(E)]. If both the east and south directions receive arbitration priority, the multicast message can be sent to the east and south directions respectively this time. The arbitration result is represented by [0(P), 1(S), 0(N), 0(W), 1(E)]. After each arbitration result is obtained, the result can be inverted and then ANDed with the multicast flag bit field. If the ANDed result is all 0s, the multicast message has been sent to all nodes connected to the destination direction. The multicast message can then be deleted. When the AND result is not all 0, the subsequent arbitration result is inverted and then ANDed with the current AND result until the AND result is all 0, and the multicast message is deleted.

[0105] Furthermore, for subsequent southbound multicast messages, if the multicast routing node receives the multicast message in the north direction and the YID of the multicast routing node is not equal to Ymin, the multicast message is transmitted southward and in the direction of the device node. Accordingly, the multicast flag field segment can be set to [1(P), 1(S), 0(N), 0(W), 0(E)].

[0106] Furthermore, for a subsequent multicast message transmitted eastward, if the multicast routing node receives the multicast message in the west direction, the YID of the multicast routing node is equal to Ymax, and the XID is not equal to Xmax, the multicast message is transmitted southward, eastward, and toward the device node. Accordingly, the multicast flag field segment can be set to [1(P), 1(S), 0(N), 0(W), 1(E)]. It should be noted that, if the multicast routing node only needs to send the multicast message to the device node, the multicast field segment of the multicast message can be set to the second flag to convert the multicast message into a unicast message and then send it to the connected device node.

[0107] In the embodiment of the present invention, the multicast flag corresponding to each to-be-sent direction is set to 1, and after sending a multicast message to the node connected to the to-be-sent direction, the multicast flag corresponding to the to-be-sent direction is set to 0. In this way, the multicast flag can be used to determine whether the multicast message has been sent to all the required directions, and the multicast message can be deleted in a timely manner to avoid unnecessary storage resource usage.

[0108] Taking the XY routing algorithm as an example, Figure 8This is a schematic diagram of message transmission provided by an embodiment of the present invention, such as Figure 8 As shown, S30 is the source routing node. For example, data can be read from a Double Data Rate (DDR) device into S30's shared cache (e.g., L3 cache), and then multicast initiated from the L3 cache. During a multicast round, S30 identifies the multicast message by parsing the multicast domain. It then extracts (Xmin, Ymin) and (Xmax, Ymax) from the multicast domain of the multicast message. Next, a comparator within the routing node compares S30's Xsrc with Xmin and Xmax, and compares S30's Ysrc with Ymin and Ymax. In this example, Xsrc is 0, Ysrc is 5, Xmin = 1, Xmax = 3, Ymin = 2, and Ymax = 4. Since Xsrc <= Xmin and Ysrc > Ymax, the target coordinates are (Xmin, Ymax) = (1, 4). After the multicast message is transmitted to S25 at (1, 4), it can first be stored in the cache of S25's device node (for example, when the device node is a processor, the cache can be the L2 cache) to avoid the potential path deadlock. The device node then modifies the multicast phase field in the multicast message in the L2 cache to the second specified value and resends it to S25. After receiving the multicast message, S25 sets the multicast flag corresponding to the target direction to 1. After sending the multicast message to each target direction, that is, when the multicast flag is set to 1, it deletes the multicast message from the buffer.

[0109] Since AI data has the characteristic of frequent multicast demand, in actual multicast scenarios, AI data needs to be packaged into multicast messages and multicasted frequently in the Internet, which puts a lot of pressure on the transmission bandwidth. In one existing method, multicast messages are transmitted to multiple destination device nodes in a consistent Internet network through unicast. This method will bring about great delays and Internet congestion scenarios, causing the Internet performance in the AI ​​scenario to drop sharply. In another existing method, a complex multicast algorithm is used to fork the message transmission in an inconsistent Internet network. This method is difficult to implement. In an embodiment of the present invention, the target coordinates are determined for the multicast message, and based on the target coordinates, the multicast message is sent to a multicast routing node located at the boundary of the area. After that, starting from the multicast routing node, fork transmission is performed within the multicast area. That is, in one round of multicast phase, the paths that can be reused are first reused until they cannot be reused. In the second round of multicast phase, the message is copied and forked. Multicast of multicast messages can be achieved based on two rounds of multicast. The multicast algorithm is more streamlined and more feasible, which can reduce the implementation cost, improve the transmission performance of the on-chip network, and more flexibly adapt to AI data multicast scenarios. And by adopting the XY routing algorithm or the YX routing algorithm, the multicast algorithm can be further simplified and the transmission delay can be further reduced. By sending the multicast message to the connected multicast routing node in each multicast routing node in the multicast area, that is, bifurcated transmission is performed, and the physical bandwidth of the on-chip network is fully utilized, all multicast routing nodes in the multicast area can quickly receive the multicast message, with shorter delays and higher transmission efficiency. Therefore, the bandwidth pressure can be reduced.

[0110] Reference Figure 9 , shows a block diagram of a message processing device provided by an embodiment of the present invention, such as Figure 9 As shown, the device may specifically include:

[0111] Determining module 201, configured to determine a target coordinate for the multicast message based on the node coordinates of the source routing node of the multicast message and the vertex coordinates of the multicast area in the multicast message; the routing node indicated by the target coordinates is a multicast routing node located at the boundary of the multicast area;

[0112] A first sending module 202 is configured to send the multicast message to the multicast routing node indicated by the target coordinates according to the target coordinates;

[0113] The second sending module 203 is configured to send the multicast message to the connected device node and the connected multicast routing node if any multicast routing node in the multicast area receives the multicast message.

[0114] Optionally, the determining module 201 is specifically configured to:

[0115] If the source routing node is outside the multicast area, determining the target coordinates for the multicast message based on the node coordinates and the vertex coordinates;

[0116] The apparatus further includes: an execution module configured to, if the source routing node is located in the multicast area, execute the step of sending the multicast message to the connected device node and the connected multicast routing node if the multicast message is received for any multicast routing node in the multicast area.

[0117] Optionally, the node coordinates include a first coordinate value and a second coordinate value, and the vertex coordinates include a minimum first coordinate value, a maximum first coordinate value, a minimum second coordinate value, and a maximum second coordinate value of the multicast area;

[0118] The determining module 201 is further configured to:

[0119] Selecting a first target value from the first coordinate value, the minimum first coordinate value, and the maximum first coordinate value; wherein the first target value does not exceed the minimum first coordinate value and the maximum first coordinate value;

[0120] Selecting a second target value from the second coordinate value, the minimum second coordinate value, and the maximum second coordinate value; wherein the second target value does not exceed the minimum second coordinate value and the maximum second coordinate value;

[0121] The first target value and the second target value are determined as the target coordinates.

[0122] Optionally, the first sending module 202 is specifically configured to:

[0123] Setting the destination address field in the multicast message to the destination coordinates;

[0124] The multicast message is sent to the multicast routing node indicated by the target coordinates according to a preset routing algorithm.

[0125] Optionally, the first sending module 202 is further configured to: when the multicast phase field in the multicast message is a first specified value, send the multicast message to the multicast routing node indicated by the target coordinates according to the preset routing algorithm;

[0126] The apparatus further includes: a modification module configured to modify the multicast phase field in the multicast message to a second specified value after the multicast message is sent to the multicast routing node indicated by the target coordinates.

[0127] Optionally, the second sending module 203 is specifically configured to:

[0128] If the multicast routing node is a target node, the routing node direction of the connected routing node belonging to the multicast area is used as the target direction; the target node is the multicast routing node indicated by the target coordinates;

[0129] If the multicast routing node is not the target node, an optional direction of the connected routing node belonging to the multicast area and having a coordinate axis priority not higher than the coordinate axis priority of the receiving direction is used as the target direction; the optional direction is a routing node direction other than the receiving direction;

[0130] The multicast message is sent to the connected device nodes in the device node direction, and the multicast message is sent to the connected multicast routing nodes in each target direction respectively.

[0131] Optionally, the second sending module 203 is further configured to:

[0132] If the multicast routing node is the target node and the coordinate axis priority of the receiving direction is not the highest priority, then taking the device node direction as a to-be-sent direction of a sending round, and sending the multicast message to the nodes connected to the to-be-sent direction within the sending round; receiving the multicast message sent by the connected device node, and taking all the target directions as a to-be-sent direction of a sending round, and sending the multicast message to the nodes connected to each of the to-be-sent directions within the sending round;

[0133] If the multicast routing node is not the target node, or if the multicast routing node is the target node and the coordinate axis priority of the receiving direction is the highest priority, the device node direction and all the target directions are used as the to-be-sent directions of a sending round, and the multicast message is sent to the nodes connected to each of the to-be-sent directions within the sending round.

[0134] Optionally, the device further comprises:

[0135] A first setting module is configured to set, for any of the sending rounds, a multicast flag corresponding to each of the to-be-sent directions in the sending round to 1;

[0136] A second setting module is configured to set the multicast flag corresponding to the to-be-sent direction to 0 after sending the multicast message to the node connected to the to-be-sent direction;

[0137] The deleting module is configured to delete the multicast message from the multicast routing node when all the multicast flag bits are 0.

[0138] In summary, in the message processing device provided by the embodiment of the present invention, the target coordinates are determined for the multicast message based on the node coordinates of the source routing node of the multicast message and the vertex coordinates of the multicast area in the multicast message; the routing node indicated by the target coordinates is the multicast routing node located at the area boundary in the multicast area. According to the target coordinates, the multicast message is sent to the multicast routing node indicated by the target coordinates. For any multicast routing node in the multicast area, if a multicast message is received, the multicast message is sent to the connected device node and the connected multicast routing node. In this way, the multicast message is first sent to the multicast routing node located at the area boundary in the multicast area according to the target coordinates, so that the multicast message can quickly reach the multicast area. Starting from the multicast routing node, the multicast routing nodes in the multicast area corresponding to the multicast message partially transmit the multicast message within the multicast area. In this way, the overall efficiency of multicasting the multicast message can be ensured to a certain extent, thereby achieving efficient multicasting.

[0139] Reference Figure 10 , is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Figure 10 As shown, the electronic device includes: a processor, a memory, a communication interface, and a communication bus. The processor, the memory, and the communication interface communicate with each other via the communication bus. The memory is used to store executable instructions that enable the processor to execute the message processing method of the aforementioned embodiment. The executable instructions can constitute a program.

[0140] An embodiment of the present invention provides a readable storage medium having executable instructions stored thereon. When executed by one or more processors, the processors are enabled to execute the message processing method of the aforementioned embodiment.

[0141] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0142] Those skilled in the art will appreciate that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. It should be noted that all actions of acquiring signals, information, or data in this application are performed in compliance with the relevant data protection laws and policies of the country of residence and with authorization from the owner of the corresponding device. The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0143] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing terminal device to operate in a predictable manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0144] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0145] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they become aware of the basic creative concepts. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0146] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or terminal device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or terminal device that includes the element.

[0147] The above is a detailed introduction to a message processing method, a message processing device, an electronic device and a readable storage medium provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the ideas of the present invention, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A message processing method, characterized in that: Applied to a network on chip, the method includes: For any coordinate value in the node coordinates of the source routing node of the multicast message, a target value of the coordinate axis dimension is selected from the coordinate value and the coordinate values ​​of the vertex coordinates of the multicast area in the multicast message that belong to the same coordinate axis dimension as the coordinate value; the target value does not exceed the coordinate values ​​of the vertex coordinates that belong to the same coordinate axis dimension as the coordinate value; the target coordinates of the multicast message are composed based on the target values ​​of each of the coordinate axis dimensions; the routing node indicated by the target coordinate is a multicast routing node located at the area boundary of the multicast area; the multicast area is rectangular; Sending the multicast message to the multicast routing node indicated by the target coordinates according to the target coordinates; For any multicast routing node in the multicast area, if the multicast message is received, the multicast message is sent to the connected device node and the connected multicast routing node.

2. The method according to claim 1, characterized in that For any coordinate value in the node coordinates of the source routing node of the multicast message, selecting a target value of the coordinate axis dimension from the coordinate value and the coordinate values ​​of the vertex coordinates of the multicast area in the multicast message that belong to the same coordinate axis dimension as the coordinate value, including: If the source routing node is located outside the multicast area, for any coordinate value in the node coordinates of the source routing node of the multicast message, select a target value of the coordinate axis dimension from the coordinate value and the coordinate values ​​of the vertex coordinates of the multicast area in the multicast message that belong to the same coordinate axis dimension as the coordinate value; The method further includes: if the source routing node is located in the multicast area, executing the step of sending the multicast message to the connected device node and the connected multicast routing node if the multicast message is received for any multicast routing node in the multicast area.

3. The method according to claim 2, characterized in that The node coordinates include a first coordinate value and a second coordinate value, and the vertex coordinates include a minimum first coordinate value, a maximum first coordinate value, a minimum second coordinate value, and a maximum second coordinate value of the multicast area; For any coordinate value in the node coordinates of the source routing node of the multicast message, selecting a target value of the coordinate axis dimension from the coordinate value and the coordinate values ​​of the vertex coordinates of the multicast area in the multicast message that belong to the same coordinate axis dimension as the coordinate value, including: Selecting a first target value from the first coordinate value, the minimum first coordinate value, and the maximum first coordinate value; wherein the first target value does not exceed the minimum first coordinate value and the maximum first coordinate value; Selecting a second target value from the second coordinate value, the minimum second coordinate value, and the maximum second coordinate value; wherein the second target value does not exceed the minimum second coordinate value and the maximum second coordinate value; Composing the target coordinates of the multicast message based on the target values ​​of the coordinate axis dimensions includes: determining the first target value and the second target value as the target coordinates.

4. The method according to claim 3, characterized in that The sending, according to the target coordinates, the multicast message to the multicast routing node indicated by the target coordinates includes: Setting the destination address field in the multicast message to the destination coordinates; The multicast message is sent to the multicast routing node indicated by the target coordinates according to a preset routing algorithm.

5. The method according to claim 4, characterized in that The sending of the multicast message to the multicast routing node indicated by the target coordinates according to a preset routing algorithm includes: sending the multicast message to the multicast routing node indicated by the target coordinates according to the preset routing algorithm when the multicast phase field in the multicast message is a first specified value; The method further includes: after the multicast message is sent to the multicast routing node indicated by the target coordinates, modifying the multicast phase field in the multicast message to a second specified value.

6. The method according to any one of claims 1 to 5, characterized in that: For any multicast routing node in the multicast area, if the multicast message is received, sending the multicast message to the connected device node and the connected multicast routing node, including: If the multicast routing node is a target node, the routing node direction of the connected routing node belonging to the multicast area is used as the target direction; the target node is the multicast routing node indicated by the target coordinates; If the multicast routing node is not the target node, an optional direction of the connected routing node belonging to the multicast area and having a coordinate axis priority not higher than the coordinate axis priority of the receiving direction is used as the target direction; the optional direction is a routing node direction other than the receiving direction; The multicast message is sent to the connected device nodes in the device node direction, and the multicast message is sent to the connected multicast routing nodes in each target direction respectively.

7. The method according to claim 6, characterized in that The sending of the multicast message to the connected device node in the device node direction, and the sending of the multicast message to the connected multicast routing nodes in each target direction respectively, include: If the multicast routing node is the target node and the coordinate axis priority of the receiving direction is not the highest priority, then taking the device node direction as a to-be-sent direction of a sending round, and sending the multicast message to the nodes connected to the to-be-sent direction within the sending round; receiving the multicast message sent by the connected device node, and taking all the target directions as a to-be-sent direction of a sending round, and sending the multicast message to the nodes connected to each of the to-be-sent directions within the sending round; If the multicast routing node is not the target node, or if the multicast routing node is the target node and the coordinate axis priority of the receiving direction is the highest priority, the device node direction and all the target directions are used as the to-be-sent directions of a sending round, and the multicast message is sent to the nodes connected to each of the to-be-sent directions within the sending round.

8. The method according to claim 7, characterized in that The method further comprises: For any of the sending rounds, setting the multicast flag corresponding to each of the to-be-sent directions in the sending round to 1; After sending the multicast message to the node connected to the direction to be sent, setting the multicast flag corresponding to the direction to be sent to 0; When all the multicast flag bits are 0, the multicast message is deleted from the multicast routing node.

9. A message processing device, characterized in that: Applied to a network on chip, the device comprises: A determination module is configured to select, for any coordinate value in the node coordinates of a source routing node of a multicast message, a target value of the coordinate axis dimension from the coordinate value and the coordinate values ​​in the vertex coordinates of a multicast area in the multicast message that belong to the same coordinate axis dimension as the coordinate value; the target value does not exceed the coordinate values ​​in the vertex coordinates that belong to the same coordinate axis dimension as the coordinate value; the target coordinates of the multicast message are composed based on the target values ​​of each of the coordinate axis dimensions; the routing node indicated by the target coordinate is a multicast routing node located at a boundary of the multicast area; and the multicast area is rectangular. A first sending module, configured to send the multicast message to the multicast routing node indicated by the target coordinates according to the target coordinates; The second sending module is configured to send the multicast message to the connected device node and the connected multicast routing node if any multicast routing node in the multicast area receives the multicast message.

10. An electronic device, characterized in that: include: A processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus; The memory is used to store executable instructions, and the executable instructions enable the processor to execute the method according to any one of claims 1 to 8.

11. A readable storage medium, characterized in that: Executable instructions are stored thereon, which, when executed by one or more processors, cause the processors to perform the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Multicast within common subnet

    CN117941324A