WO2018054201A1 - Routing multicast method and system based on 2d mesh network - Google Patents

Routing multicast method and system based on 2d mesh network Download PDF

Info

Publication number
WO2018054201A1
WO2018054201A1 PCT/CN2017/099583 CN2017099583W WO2018054201A1 WO 2018054201 A1 WO2018054201 A1 WO 2018054201A1 CN 2017099583 W CN2017099583 W CN 2017099583W WO 2018054201 A1 WO2018054201 A1 WO 2018054201A1
Authority
WO
WIPO (PCT)
Prior art keywords
multicast
routing
information
node
packet
Prior art date
Application number
PCT/CN2017/099583
Other languages
French (fr)
Chinese (zh)
Inventor
裴京
Original Assignee
清华大学
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from CN201610834604.5A external-priority patent/CN106341331B/en
Priority claimed from CN201611102312.9A external-priority patent/CN106789675B/en
Application filed by 清华大学 filed Critical 清华大学
Publication of WO2018054201A1 publication Critical patent/WO2018054201A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/10Packet switching elements characterised by the switching fabric construction
    • H04L49/109Integrated on microchip, e.g. switch-on-chip
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/16Multipoint routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing

Definitions

  • the present invention relates to the field of on-chip networks, and in particular, to a routing multicast method and system based on a 2D mesh network.
  • the 2D mesh network is the most widely used network structure in the on-chip network. Its advantage is that the network has strong symmetry and scalability, and the routing algorithm is simple and easy to analyze and implement.
  • Routing packet multicasting in 2D mesh networks is a widely-recognized problem. Finding a routing multicast method with simple implementation, low hardware overhead, and low network bandwidth utilization (efficient) is the goal of on-chip network designers.
  • Common traditional route multicast methods mainly include multi-route packet based on source node and multicast on transmission path based on packet matching.
  • multi-route packet based on source node concurrent multicast needs to generate multiple routing packets equivalent to the number of target nodes at the source node, due to these
  • the routing packet contains a large amount of the same information, so the problem of low effective utilization of network resources occurs, and it is especially obvious when there are many multicast routing packets.
  • the multicasting on the transmission path based on packet matching requires the routing node to have packet filtering.
  • the transmission path needs to include all target nodes. This process has high requirements for the development of routing algorithms.
  • the traditional routing multicast method has low network resource utilization and high routing algorithm requirements, and provides a route based on 2D mesh network that improves the efficiency of routing multicast and reduces the occupation of network resources by the multicast process. Broadcast method and system.
  • a multicast control section storing multicast information is allocated in the routing packet, the multicast information including multicast enabling information, multicast direction information, and multicast step Long message
  • a routing multicast system based on a 2D mesh network comprising: a processor for executing the following program modules stored in a storage medium:
  • An allocation module configured to allocate a multicast control section storing multicast information, where the multicast information includes multicast enable information, multicast, when a routing packet is generated by a source node of the 2D mesh network Direction information and multicast step information;
  • a routing transmission module configured to extract a target node address from the routing packet, and transmit the routing packet to the target node by using a routing network according to the target node address;
  • a multicast control module configured to extract, by the multicast routing segment, the multicast enable information, the multicast direction information, and the multicast step information, and according to the multicast enable information, The multicast direction information and the multicast step information control the routing packet for multicast routing.
  • the routing multicast method and system based on the 2D mesh network the routing packet generated at the source node of the 2D mesh network includes multicast enabling information, multicast direction information, and multicast step information, and the routing packet is not started yet. Only one routing packet is needed to complete the transmission of the routing packet in the network path, and when the routing packet is multicast, it is controlled on the target node according to the multicast enabling information, the multicast direction information, and the multicast step information.
  • the routing packet performs multicast routing. Therefore, compared with the traditional method of generating multiple routing packets at the source node for multicast routing, the network bandwidth is small, the multicast efficiency is more efficient, and the implementation is simple and the logic is occupied. There are few resources, and there is no need to formulate special algorithm capabilities for routing nodes and routing paths, and the requirements for routing algorithms are low.
  • the multicast routing node After receiving the routing packet, the multicast routing node extracts multicast control information and multicast step information stored locally by the multicast routing node;
  • the present invention also provides a routing multicast system based on a 2D mesh network, the system comprising: a processor, where The processor is used to execute the following program modules stored in the storage medium:
  • An extracting module configured to: after the routing packet is received by the multicast routing node, extract the multicast control information and the multicast step information stored locally by the multicast routing node;
  • an acquiring module configured to: when the multicast control information is valid, extract the multicast direction information in the multicast control information, and obtain a current node address of the multicast routing node;
  • a determining module configured to determine, according to the current node address, the multicast direction information, and the multicast step information, a target node address of a target routing node to which the routing packet is to be routed, and according to the target node address Routing the routing packet to the target routing node.
  • the routing multicast method and system based on the 2D mesh network store the multicast control information and the multicast step information of the routing packet in the routing multicast process in the routing node in the 2D mesh network, so that when the multicast control is stored
  • the routing node of the information and multicast step information receives the routing packet, all routing packets routed by the routing node are multicast, without the information related to the multicast process in the routing packet, which can reduce the routing.
  • the information contained in the packet can effectively improve the efficiency of routing packets for multicast routing, reduce the occupation of 2D mesh network resources by the multicast process, and improve the utilization of 2D mesh network resources.
  • the multicast data in the routing packet is a simple and convenient multicast process.
  • FIG. 1 is a schematic structural diagram of a routing packet format in an embodiment
  • FIG. 2 is a schematic flowchart of a route multicasting method based on a 2D mesh network in an embodiment
  • FIG. 3 is a schematic flowchart of a route multicast method based on a 2D mesh network in another embodiment
  • FIG. 4 is a schematic flowchart of a route multicast method based on a 2D mesh network in still another embodiment
  • FIG. 5 is a schematic diagram of a process of routing multicast based on a 2D mesh network in Embodiment 1;
  • FIG. 6 is a schematic structural diagram of a routing packet format in Embodiment 1;
  • FIG. 7 is a schematic diagram of a process of routing multicast based on a 2D mesh network in Embodiment 2;
  • FIG. 8 is a schematic structural diagram of a routing packet format in Embodiment 2.
  • FIG. 9 is a schematic diagram of a process of routing multicast based on a 2D mesh network in Embodiment 3;
  • FIG. 10 is a schematic structural diagram of a routing packet format in Embodiment 3.
  • FIG. 11 is a schematic structural diagram of a routing multicast system based on a 2D mesh network in an embodiment.
  • FIG. 12 is a schematic flow chart of a serial routing multicast method of a 2D mesh network in an embodiment
  • FIG. 13 is a schematic flowchart of step S200 in FIG. 12 in an embodiment
  • FIG. 14 is a schematic flowchart of step S300 in FIG. 12 in an embodiment
  • 15 is a schematic diagram of a routing node arrangement in a 2D mesh network in an embodiment
  • FIG. 16 is a schematic diagram of a process of routing multicast based on a 2D mesh network in Embodiment 4;
  • FIG. 17 is a schematic diagram of a process of routing multicast based on a 2D mesh network in Embodiment 5;
  • FIG. 18 is a schematic structural diagram of a routing multicast system based on a 2D mesh network in an embodiment.
  • the routing multicast method mainly includes multicast information and transmission control thereof, and the multicast information includes multicast control information, multicast direction information, and multicast step information; the multicast information may be stored in a routing packet generated by a source node, Either in the node local routing control table, or stored locally in the routing packet and routing node.
  • the one-dimensional or two-dimensional route multicast of the 2D mesh network is implemented based on the above multicast information and route control method.
  • a route multicast method based on a 2D mesh network includes the following steps:
  • the multicast control section 1000 storing the multicast control section 1001, the multicast direction information 1002, and the multicast step information 1003 is allocated in the routing packet.
  • S200 Extract a target node address 2000 from the routing packet, and transmit the routing packet to the target node according to the target node address 2000 through the routing network.
  • the 2D mesh network includes multicast enable information 1001, multicast direction information 1002, multicast step information 1003, and a target node to which the routing packet is to be transmitted, in the routing packet generated by the source node.
  • the address 2000 and the payload data carried by the routing packet itself are 3000; the purpose of routing the routing packet multicast to the corresponding target node is to deliver the payload data 3000 to the corresponding target node for analysis and processing by the target node.
  • a certain interval is reserved in the routing packet to store the multicast control section 1001, the multicast direction information 1002, and the multicast step information 1003, and the like. Routing multicast related information.
  • the routing packet is transmitted to the target node through the routing network, and after the routing packet is delivered to the target node, according to the multicast enabling information 1001 in the routing packet, and the multicast direction information 1002 and more
  • the broadcast step information 1003 controls the routing packet for multicast routing. Since the routing packet includes the multicast control section 1000, it is not necessary to generate multiple routing packets corresponding to the multicast routing node at the source node, and the routing packet is transported from the source node to the destination node. A routing packet is required.
  • the routing packet adopts a point-to-point network transmission mode, that is, only one routing packet is needed to complete the transmission of the routing packet in the network path that does not start multicasting, in the routing.
  • a new routing packet is generated on the target node according to the multicast control section 1001, the multicast direction information 1002, and the multicast step information 1003, and the new routing packet is multicasted, so Traditionally, multiple routing packets are generated at the source node for multicast routing.
  • the network bandwidth is small and the multicast efficiency is more efficient, especially in the continuous multicast process.
  • the routing multicast method in this embodiment is simple to implement, and occupies less logical resources, and does not need to formulate special algorithm capabilities for routing nodes and routing paths, and adopts traditional routing algorithms, such as: XY-dimensional routing algorithm, YX-dimensional routing. Algorithms, etc., can realize the transmission of routing packets, and have lower requirements on routing algorithms.
  • the step of allocating a multicast control section storing multicast enablement information, multicast direction information, and multicast step size information in the routing packet includes:
  • the broadcast enable information, the multicast direction information, and the multicast step information are stored in the multicast control section of the routing packet; or the payload data in the routing packet is obtained, and the preset information is queried according to the index information of the payload data.
  • the broadcast information table queries the preset multicast information table to obtain the multicast enable information, the multicast direction information, and the multicast step information that match the index information, and stores the information in the multicast control section of the routing packet. .
  • the multicast target node information includes a number of multicast target nodes, a multicast target node address, and a connection relationship between the multicast target nodes.
  • the index information refers to information such as an index number set for the payload data according to the attribute information such as the size and type of the payload data, and the payload data having the same or similar attributes has the same index information, and each index information is preset. Corresponding unique multicast information in the broadcast information table.
  • interval size of the multicast control section may be adjusted according to the size of the multicast information obtained by the query, or may be preset according to experience.
  • the preset multicast information table can be preset according to experience.
  • the method prior to the step of transmitting the routing packet to the destination node via the routing network based on the target node address 2000, the method includes:
  • Determining whether the routing packet reaches the target node that is, determining whether the routing node address where the routing packet is currently located is consistent with the target node address 2000; if yes, determining that the routing packet arrives at the target node; if not, determining that the routing packet has not reached the target node.
  • Each routing node corresponds to unique address information.
  • the step of transmitting the routing packet to the target node through the routing network according to the target node address 2000 includes:
  • the routing packet is transmitted to the destination node through the routing node and the input and output channels between the source node and the target node.
  • the routing packet is preferentially routed in the X direction. Therefore, the routing packet is output from the output channel on the right side of the source node, and the (1,0) node receives the routing packet from the left input channel, and the (1,0) node receives the routing packet from (1,0).
  • the lower output channel of the node outputs, and the (1,1) node receives the routing packet from the input channel on the upper side, thereby completing routing of the routing packet.
  • the routing channel connecting the two routing nodes can be used as an output channel or an input channel, depending on the function at the time of use.
  • control routing packet upon determining that the routing packet has not arrived at the destination node, continues to be routed through the routing network between the routing node and the destination node where the routing packet is currently located until the routing packet is delivered to the destination node.
  • step S300 includes:
  • a space for storing the multicast enabling information 1001 is allocated in the multicast control section 1000 of the routing packet, and the space size is usually set to 1 bit (bit), if The multicast enable information 1001 is represented by E.
  • indicating that the current routing packet is a multicast routing packet the current route The packet needs to be multicast. Otherwise, it indicates that the current routing packet has been transmitted to the corresponding destination node, and the routing of the current routing packet is ended. This avoids unnecessary routing multicast and reduces unnecessary network resource occupation.
  • the step of determining whether the multicast enable information 1001 is valid further includes:
  • the enable identifier E indicating the multicast enable information 1001 is 0; if 0, it is determined that the multicast enable information 1001 is invalid; if it is 1, it is determined that the multicast enable information 1001 is valid.
  • step S311 further includes:
  • step S311' it is determined whether there is a valid multicast step size in the multicast step information 1003; if yes, step S311a is performed; if not, step S312 is performed.
  • the target node address 2000 in the routing packet is updated according to the multicast direction information 1002 and the target node address 2000 where the routing packet is currently located, and returns to step S200.
  • the multicast step information 1003 is a valid multicast step; if there is a valid multicast step, the route is indicated.
  • the packet needs to be multicasted.
  • the new destination node address 2000 to which the routing packet is to be transmitted is updated according to the current target node address 2000 of the routing packet and the routing direction information, thereby The target node address transmits the routing packet to the new target node through the routing network.
  • the routing packet arrives at the new target node, it re-executes whether the multicast enabling information is valid and whether the multicast step information is a valid multicast step.
  • the packet ends the route.
  • Each multicast step size can represent the distance between one routing node and multiple routing nodes.
  • the distance between each multicast step can be set in advance according to requirements. Therefore, the next target of the routing packet can be obtained after knowing the multicast direction information 1002 and the target node address 2000 where the routing packet is currently located. Node address.
  • the routing direction information D is stored in the multicast control section 1000 of the routing packet, and the multicast direction information D is allocated a storage space in the multicast control section 1000 of the routing packet, and the space size is usually Set to 1 bit (bits), or set to multiple bits as needed.
  • the space size for storing the multicast direction information may be set to 2 bits
  • the direction is along the Y direction
  • step S311' includes:
  • the broadcast step is an effective multicast step size.
  • the value of the multicast step length L here may be a positive value or a negative value. Both positive and negative values are valid multicast steps.
  • a positive value indicates that the multicast routing direction is routed toward a predetermined positive direction; a negative value indicates that the multicast routing direction is routed in a direction opposite to a predetermined positive direction. For example, set the horizontal direction to the X direction and the positive direction to the right along the X direction.
  • a positive value indicates that the route is routed to the right in the X direction, and a negative value indicates that the route is routed to the left in the X direction.
  • a space for storing the multicast step information 1003 is allocated in the multicast control section 1000 of the routing packet, and the space size is usually set to 3 bits.
  • the space size of the storage multicast step information 1003 is based on multicast. Set the maximum value of the step size. For example, if the maximum value of the multicast step is 7, the maximum value is converted to a binary code of 111. At this time, the space size for storing the multicast step information 1003 is set to 3 bits. Can meet the storage of multicast steps without wasting storage space.
  • the space size of the multicast step information 1003 can also be set according to the number of multicast target nodes.
  • a negative sign bit such that if the maximum number of multicast steps is 7, the space in which the multicast step is stored is set to 4 bits.
  • a maximum of 0 indicates a positive value and a 1 indicates a negative value.
  • the method when performing step S311a, the method further includes:
  • the multicast step information 1003 in the routing packet multicast control section 1000 is also updated, thereby generating a new routing packet on the current routing node, the routing packet including new Destination node address, new multicast step information 1003, multicast enable information 1001 and multicast direction information 1002, multicast based on new target node address in the new routing packet, new multicast step information
  • the enable information 1001 and the multicast direction information 1002 determine whether the routing packet continues to perform multicast routing and control the multicast flow.
  • the step of updating the multicast step information 1003 in the multicast control section 1000 includes:
  • the multicast step information 1003 is a positive value, the value indicating the multicast step size in the multicast step information 1003 is decremented by one. If the multicast step information 1003 is a negative value, the value indicating the multicast step size in the multicast step information 1003 is incremented by one. That is, each time the routing packet performs the multicast process, the multicast step information 1003 in the routing packet is updated once, until the value indicating the multicast step size in the multicast step information 1003 is updated to 0, and the routing packet is represented at this time. Multicast has been completed, and multicast routing of routing packets is stopped.
  • the multicast step size information 1003 reflects the multicast process of the routing packet in real time, facilitates multicast control of the routing packet, and avoids unnecessary networking of unnecessary multicast processes.
  • the method further includes:
  • S400 Extract the payload data 3000 from the routing packet, and send the payload data 3000 to the local processing unit connected to the target node.
  • the payload data 3000 in the routing packet is unchanged, so that the multicasting of the payload data 3000 in the routing packet on different routing nodes can be realized.
  • the local processing unit corresponding to each target routing node analyzes and processes the payload data 3000 to implement the corresponding function.
  • the routing nodes are arranged in a 2D mesh network structure, and each routing node is connected to an adjacent routing node through four pairs of input and output channels to form a 2D mesh network.
  • Each routing node is connected to a local processing unit.
  • the local processing unit may be a processor core or other resource module.
  • the preset horizontal direction is the positive direction of the X-axis
  • the vertical direction is the positive direction of the Y-axis.
  • the routing coordinates of the routing node at the upper left are (0, 0).
  • the routing packet multicast control section 1000 occupies a space of 5 bits, wherein the multicast enabling information E is allocated. 1bit, multicast direction information D allocation 1 bit, the multicast step size information 1003 is represented by L, occupying 3 bits.
  • X[3..0] is used to store the target node X address
  • Y[3..0] is used to store the target node Y address
  • Data[7..0] is the 8-bit payload data.
  • FIG. 6 shows a routing packet routing process from source node (0, 0) to routing node (2, 1), (2, 2), (2, 3).
  • the routing packet ⁇ 11010 0010 0001xxxxxxxx ⁇ is generated at the source node (0, 0), that is, the location of the multicast enable information is 1, and the location of the multicast direction information is 1, indicating that the multicast direction is along the Y direction, and the multicast step information is The position is 2, indicating continuous multicasting of 2 steps, the target node address is (2, 1), and the payload data is represented by x.
  • the routing packet is preferentially routed in the X direction, so the multicast routing packet is sent from the output channel on the right side of the source node, and the (1, 0) node receives the routing packet from the left input channel.
  • the routing algorithm unit detects the routing packet node address information, and determines that the routing packet needs to be sent from the right output channel of the (1,0) node, similarly, until the multicast routing packet Delivered to the target node (2, 1), the multicast routing packet goes through the path (0,0)->(1,0)->(2,0)->(2,1) to reach the target node.
  • the routing packet arrives at the destination node (2, 1), the payload data in the routing packet is sent to the local processing unit, and the multicast process is performed at the same time.
  • the multicast process mainly includes the following steps: detecting whether the multicast enable information of the routing packet is 1, and if it is 1, performing a multicast process; otherwise, the multicast process is not performed (the routing packet ends the route); If the multicast enable information is 1, the multicast direction information and the multicast step information in the routing packet multicast control section 1000 are detected. If the multicast step size information is 0, the routing of the routing packet is ended, otherwise, Determining, according to the multicast step information and the multicast direction information, the destination node address to which the routing packet is to be routed next.
  • each step represents a routing node distance, so It can be determined that the destination node to which the routing packet is to be routed is (2, 2), and the multicast step information is updated. Since the multicast step information is positive, the multicast step information is positive. The value is decremented by 1 to update the multicast step positive value to 001, and finally a new routing packet ⁇ 11001 0010 0010xxxxxxxx ⁇ is generated at the target node. After the newly generated routing packet reaches the node (2, 2), it continues to detect the multicast step size information in the routing packet. If the multicast step size information is 0 at this time, the routing packet ends the multicast routing process, otherwise, The multicast process continues.
  • the routing packet Since the multicast step information in the routing packet is 1, the routing packet is determined according to the multicast direction information (the multicast direction is along the Y-axis direction) and the destination node address where the routing packet is currently located. Next, the destination node address to be routed to is (2, 3), and the multicast step size information in the routing packet is updated to 000, and finally a new routing packet is generated at the target node (2, 2) ⁇ 11000 0010 0011xxxxxxxx ⁇ , and deliver the new routing packet to the newly determined target node (2, 3).
  • the YX-dimensional routing algorithm is adopted, that is, the routing packet is first routed in the Y direction, and then routed in the X direction.
  • the routing packet format is as shown in FIG. 7 : in the routing packet, the multicast control section 1000 occupies 4 bits in total, wherein the multicast enabling information E is allocated 1 bit, the multicast direction information D is allocated 1 bit, and the multicast step information L is allocated. 2bit.
  • X[3..0] is used to store the target node X address
  • Y[3..0] is used to store the target node Y address
  • Data[7..0] and Extra[7..0] are 16bit payload data. .
  • FIG. 8 shows a multicast process of routing packets from a source node (0, 0) to a routing node (3, 1), (3, 3), (3, 5).
  • the routing packet ⁇ 1110 0011 0001xxxxxxxx xxxxxxxx ⁇ is generated at the source node (0, 0), that is, the location of the multicast enable information is 1, and the location of the multicast direction information is 1, indicating that the multicast direction is along the Y direction, and the multicast step size is
  • the information position is 2, indicating 2 consecutive steps of multicast, the target node address is (3, 1), and the payload data is represented by x.
  • the routing packet goes through a path (0,0)->(0,1)->(1,1)->(2,1)->(3,1) on the 2D mesh network.
  • each step indicates the distance between two routing nodes, according to the current destination node of the routing packet (3, 1) and the routing direction determines that the destination node to be routed to the routing packet is (3, 3), and simultaneously updates the multicast step size information, reduces the value of the multicast step size by 1 operation, and updates the multicast step size information.
  • a new routing packet ⁇ 1101 0011 0011xxxxxxxxxxxxxxxxxxxx ⁇ is finally generated at the node (3, 1), and the newly generated routing packet is delivered to the node (3, 3) according to the address of the target node (3, 3).
  • the routing packet complete multicast routing path is shown in Figure 8.
  • an XY dimension routing algorithm is adopted.
  • the routing packet format is as shown in FIG. 9 : in the routing packet, the multicast control section 1000 occupies 6 bits in total, wherein the multicast enabling information E is allocated 1 bit, the multicast direction information D is allocated 2 bits, and the multicast step information L is allocated. 3bit.
  • X[3..0] is used to store the target node X address
  • Y[3..0] is used to store the target node Y address
  • Data[7..0] and Extra[7..0] are 16bit payload data. .
  • this routing packet is a point-to-point common routing packet
  • this routing packet is a multicast routing packet
  • the multicast step size information L has a maximum value of 4, and each step represents the distance of one routing node.
  • FIG. 10 shows a routing packet from a source node (0, 0) to a routing node (1, 1), (1, 2), (1, 3), (2, 1), (3).
  • the routing packet ⁇ 111010 0001 0001xxxxxxxx xxxxxxxx ⁇ is generated at the source node (0, 0), that is, the location of the multicast enable information is 1, and the location of the multicast direction information is 11, indicating that the multicast direction is in both X and Y directions.
  • the multicast step information position is 2, indicating 2 consecutive steps of multicast, the target node address is (1, 1), and the payload data is represented by x.
  • the routing packet goes through the path (0,0)->(1,0)->(1,1) on the 2D mesh network to reach the target node, and detects on the target node (1,1).
  • each step represents a routing node distance
  • two new routing packets ⁇ 111001 0001 0010xxxxxxxx xxxxxxxx ⁇ and ⁇ 111001 0010 0001xxxxxxxx xxxxxxxx ⁇ are finally generated on the target node, and the routing packet will be routed.
  • ⁇ 111001 0001 0010xxxxxxxx xxxxxxxx ⁇ is delivered to the new target node (1, 2)
  • the route including ⁇ 111001 0010 0001xxxxxxxx xxxxxxxx ⁇ is delivered to the new target node (2, 1).
  • the information is 0, and the routing packet ends the route.
  • a new routing packet ⁇ 111000 0011 0001xxxxxxxx xxxxxxxx ⁇ and ⁇ 111000 0010 0010xxxxxxxx xxxxxxxx ⁇ are generated according to the detected multicast direction information and multicast step information, and the routing packet is respectively ⁇ 111000 0011 0001xxxxxxxx xxxxxxxx ⁇ and ⁇ 111000 0010 0010xxxxxxxxxxxxxxxx ⁇ are sent to the target nodes (3, 1) and (2, 2), and the multicast step information is detected on the target nodes (3, 1) and (2, 2). 0, the routing packet ends the route.
  • the routing completion multicast routing path is as shown in FIG.
  • the maximum value 4 of the multicast step information that is, the space of the multicast step can be represented by the space of 2 bits, but in this embodiment, the multicast step information occupies 3 bits. The highest bit of this 3 bit space is used to represent the binary step binary symbol, 0 for positive values, 1 for negative values, and 2 bits for multicast step size.
  • a computer readable storage medium is also provided, the computer readable storage medium storing computer instructions that, when executed by a processor, implement the steps of the 2D mesh network based routing multicast method described above.
  • the computer program is programmed to execute the associated hardware, and the program can be stored in a computer readable storage medium, which, when executed, can include the flow of an embodiment of the methods described above.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
  • a routing multicast system based on a 2D mesh network including a processor for executing the following program modules stored in a storage medium:
  • the allocating module 100 is configured to allocate multicast control information for storing the multicast enable information 1001, the multicast direction information 1002, and the multicast step information 1003 in the routing packet when the routing node of the 2D mesh network generates the routing packet. Section 1000.
  • the routing transmission module 200 is configured to extract the target node address 2000 from the routing packet, and transmit the routing packet to the target node according to the target node address 2000 through the routing network.
  • the multicast control module 300 is configured to extract the multicast enable information 1001, the multicast direction information 1002, and the multicast step information 1003 from the multicast routing section, and according to the multicast enable information 1001 and the multicast direction information 1002. And multicast step size information 1003 controls the routing packet for multicast routing.
  • the routing packet generated at the source node of the 2D mesh network includes multicast enabling information 1001, multicast direction information 1002, multicast step information 1003, and a routing packet to be transmitted to.
  • the target node controls the routing packet to perform multicast routing according to the multicast enable information 1001, the multicast direction information 1002, and the multicast step information 1003, so that multiple routing packets are generated at the source node for multicast routing.
  • the routing multicast method in this embodiment is simple to implement, and occupies less logical resources, and does not need to have a special algorithm capability for the routing node and the routing path, and the routing algorithm can be implemented by using a traditional routing algorithm, and the routing algorithm is required. Lower.
  • the multicast control module 300 includes: an enabling determining unit 310, configured to determine whether the multicast enabling information 1001 in the multicast control section 1000 is valid; if yes, enter the multicast routing unit 311; Otherwise, the route end unit 312 is entered.
  • the multicast routing unit 311 is configured to control the routing packet to perform multicast routing according to the multicast direction information 1002 and the multicast step information 1003.
  • the routing end unit 312 is configured to control the routing packet ending route.
  • the multicast routing unit 311 includes: a step determining subunit 311' for determining whether there is a valid multicast step in the multicast step information 1003; if yes, entering the target address updating subunit 311a And return to the route transmission module 200; if not, enter the route end unit 312.
  • the target address update subunit 311a is configured to update the target node address 2000 in the routing packet according to the multicast direction information 1002 and the target node address 2000 where the routing packet is currently located.
  • the multicast routing unit 311 further includes:
  • the step update subunit 311b is configured to update the multicast in the multicast control section 1000 while updating the target node address 2000 in the routing packet according to the multicast direction information 1002 and the target node address 2000 where the routing packet is currently located. Step information 1003.
  • the method further includes: a sending module 400, configured to: after the routing packet is delivered to the target node, extract the payload data 3000 from the routing packet, and send the payload data 3000 to the local processing unit connected to the target node. .
  • a serial routing multicast method for a 2D mesh network comprising the following steps:
  • the multicast control information and the multicast step information of the routing packet for the routing multicast process are stored in the routing node in the 2Dmesh network, so that when the multicast control information and the multicast step information are stored, the route is stored.
  • the node multicast routing node
  • all routing packets routed by the routing node are multicast, which is equivalent to the multicast process in the routing node unit, without having to allocate more storage in the routing packet.
  • the storage area of the broadcast control information and the multicast step information that is, only the valid data information generated by the neuromorphic processing unit in the routing packet, and does not contain information related to the multicast process, so that the information contained in the routing packet can be reduced, and Effectively improve the efficiency of routing packets for multicast routing, reduce the occupation of 2D mesh network resources by the multicast process, and improve the utilization of 2D mesh network resources.
  • the multicast data in the routing packet is a simple and convenient multicast process.
  • the multicast control information and the multicast step information may be configured in all routing nodes in the 2D mesh network, and the multicast control information and the multicast step information may also be configured in the partial routing node.
  • more The broadcast control information and the multicast step size information are stored in a storage unit to which the routing node is connected.
  • the storage unit comprises a first storage unit storing multicast control information and a second storage unit storing multicast step information.
  • the multicast control information and the multicast step information are respectively stored in two storage units, which can reduce the process of searching in the same storage unit when acquiring the multicast control information and the multicast step information, and improve the multicast control information and the multicast step.
  • the first storage unit and the second storage unit may be a register, a memory or a hard disk.
  • the storage unit is a register, and the read/write efficiency of the register is faster, which can further improve the efficiency of the multicast routing.
  • a routing packet when a routing packet performs multicast routing, it only performs one-step routing at a time. Therefore, it can know the current node address and multicast direction information and multicast of the routing node where the routing packet is currently located. After the step information, confirm the destination node address of the routing node to which the routing packet will be routed.
  • a multicast step size herein may indicate a distance between one routing node, and may also indicate a distance of multiple routing nodes, and the distance of the routing node indicated by each multicast step length may be set in advance according to requirements.
  • the method further includes:
  • the routing packet is sent to the corresponding neuromorphic processing unit, so that the corresponding neuromorphic processing unit analyzes and processes the valid data in the routing packet, and completes the corresponding The function.
  • step S200' includes:
  • step S220' determining whether the multicast step size information has a valid multicast step size, and if so, executing step S221'; if not, executing step S230.
  • step S200' it is a specific embodiment of step S200'.
  • whether the routing node performs the multicast process is jointly determined by the multicast control information and the multicast step information, in the multicast control information and the multicast step. When the long information is valid at the same time, the routing node can perform the multicast process.
  • the storage space occupied by the configuration multicast control information A is 2 bits (bits, the minimum unit describing the amount of computer data), and the storage space occupied by the multicast step information B is 8 bits.
  • the value of the multicast control information A is 00 or 11
  • the multicast control information is invalid, indicating that there is no multicast, and the routing packet is not routed to the routing node, and the multicast process is not performed.
  • the routing packet reaches the routing node, the routing ends; when the value of the multicast control information A is 01, the multicast control information is valid, indicating that the routing node is configured as a multicast routing node, that is, after the routing packet arrives at the routing node, The multicast process is required, and the multicast direction is the X direction.
  • the value of the multicast control information A is 10
  • the multicast control information is valid, indicating that the routing node is configured as a multicast routing node, that is, the routing packet arrives at the route.
  • the multicast process is also required after the node, and the multicast direction is the Y direction.
  • the routing packet that arrives at the routing node needs to be multicast, and the multicast step information of the routing node needs to be further obtained.
  • the value of the multicast step information B is 0, there is no valid multicast step size in the multicast step information, and the multicast is still invalid, the routing node does not perform multicast; when the multicast step information B When the value of the value is non-zero, the target routing node to which the routing packet is to be routed is determined according to the multicast step size in the multicast step information and the multicast direction in the multicast direction information.
  • the value of the multicast control information A in the above embodiment is 00 or 11, it means that there is no multicast, which is for convenience of description and is not limited.
  • the value of the multicast control information A is 00, it means that there is no multicast, and the value of the multicast control information A is 11, indicating that there is a multicast process, and the direction of the multicast is simultaneous to the X. And Y direction.
  • all routing packets routed from the same multicast routing node have the same destination node address. That is, after a certain routing node is configured with multicast routing information, it is usually not arbitrarily changed. All the routing packets sent by the multicast routing node will be routed to the same destination routing node, and the multicast routing of the 2D mesh network is improved. Further, all routing packets sent from the same multicast routing node have a target node address in one direction (only one destination routing node).
  • the multicast direction is one, and the multicast direction is either the X direction or the Y direction, so that the routing packet is guaranteed to be executed during the multicast process.
  • Serial execution does not cause too many target routing nodes to be called when multicasting in multiple directions at the same time, and the same routing node is called as a destination routing node by many routing nodes, avoiding complicated multicast paths in multiple directions.
  • the phenomenon of cyclic multicast is one, and the multicast direction is either the X direction or the Y direction, so that the routing packet is guaranteed to be executed during the multicast process.
  • the routing packet involves the connection relationship of a large number of one-to-many (one source routing node corresponding to multiple target routing nodes). This often leads to the problem of insufficient fan-in fanout of the neuromorphic processing unit, that is, a neuromorphic processing unit may need to analyze and process multiple routing packets at the same time, or a routing packet generated by a neuromorphic processing unit may be used by multiple other nerves.
  • the morphological calculation unit analyzes and processes, and sets the routing packet to route only one routing direction when a routing node performs multicast for the multicast source node, which can well solve the problem of insufficient fan-in fanout of the neuromorphic processing unit.
  • performing multicast on a routing node unit only to one routing direction means that there is only one routing direction in a multicast process, instead of performing multiple multicast processes in the entire 2D mesh network.
  • One way By direction For example, when the routing node E performs multicast for the multicast routing node, the multicast direction is only the X direction. When the routing packet arrives at the destination routing node F, the target routing node F performs multicast as a new multicast routing node.
  • the multicast direction can be only the Y direction or only the X direction.
  • step S300' includes:
  • step S320' determining that the first routing node is the target routing node, sending the valid data in the routing packet to the neuromorphic processing unit connected to the target routing node, and determining whether the multicast routing information and the multicast step are configured in the target routing node. Long message; if yes, step S321' is performed; if not, step S322' is performed.
  • control routing packet continues to be routed through the 2D mesh network until it is routed to the target routing node.
  • each time a routing node arrives it is determined whether the node address of the routing node is the destination node address, that is, whether the routing packet reaches the target routing node, and if the arriving routing node is the target routing node, Sending the valid data of the routing packet to the corresponding neuromorphic processing unit of the target routing node for analysis and processing, and then determining whether the multicast routing information and the multicast step information are configured in the target routing node (ie, determining the target routing node) Whether it is a multicast routing node), if configured, extracts multicast control information and multicast step information in the multicast routing node, and performs the next multicast process to implement serial continuity of the multicast process; If the configuration is not configured, the target routing node is not a multicast routing node, and the multicast process is not performed.
  • the multicast process of the routing packet ends.
  • one routing node is configured as a multicast routing node (the multicast control information and the multicast step information are stored in the routing node), and may be other multicast routing nodes.
  • the target routing node that is, after the routing packet arrives at the destination routing node from a multicast routing node, if the target routing node is also a multicast routing node, the routing packet continues to perform the multicast process until the routing packet arrives at a target routing node that is not Broadcast routing node. That is, the multicast process of routing packets in the 2D mesh network can be serially continuous, and the number of multicasts is not limited.
  • each multicast is a replication of the effective data of the routing packet in the routing node unit, the problem of the complicated multicast process for configuring the multicast routing information for each routing packet can be well overcome, which is simple and convenient to implement. And the information contained in the routing packet is reduced, which is also beneficial to improve the efficiency of the multicast routing and reduce the occupation of network resources.
  • the routing nodes are arranged in a 2D mesh network structure, each The routing node is connected to adjacent routing nodes through four pairs of input and output channels to form a 2D mesh network.
  • Each routing node can be connected to one or more neuromorphic processing units.
  • the preset horizontal direction is the positive direction of the X-axis
  • the vertical direction is the positive direction of the Y-axis.
  • the routing coordinates of the routing node at the upper left are (0, 0).
  • each routing node in the 2D mesh network sets register A and register B.
  • Register A is used to store multicast control information
  • register B is used to store multicast step information, wherein the register occupies 2 bits and the register B occupies 8bit bit width, ie A[1:0], B[7:0].
  • the bit width occupied by register A and register B can also be determined according to specific needs, and is for illustrative purposes only and is not intended to be limiting.
  • the value of the register A is 00 or 11 it means that there is no multicast, and the routing node does not perform the multicast operation, that is, the route ends when the routing packet arrives at the destination routing node; when the value of the register A is 01, the routing node is represented.
  • Configured as a multicast routing node that is, the routing packet needs to perform multicast operation after reaching the destination routing node, and the multicast direction is the X direction; when the value of the register A is 10, it indicates that the routing node is configured as a multicast routing node. That is, after the routing packet arrives at the destination routing node, multicast operation is required, and the multicast direction is the Y direction.
  • the value of the register A 01 or 10
  • the routing node needs to perform multicast, and the multicast destination node needs to be further determined according to the register B.
  • the multicast step size register value is 0, the multicast is invalid; when the register value B is non-zero, the target routing node determines jointly according to the multicast direction and the multicast step size.
  • the source routing nodes (0, 0) and (3, 1) simultaneously send routing packets to the destination routing node (2, 1), and the source routing node passes the routing algorithm unit of the routing node in the 2D mesh network to the destination routing node.
  • the target routing node it is necessary to determine in real time whether the target routing node is reached. If it does not arrive, it needs to continue to send the routing packet to the next routing node through the 2D mesh network. If it arrives, the valid data in the routing packet is sent to the corresponding neural configuration. Processing unit.
  • S001 Send valid data in the routing packet to a neuromorphic processing unit connected to the routing node (2, 1).
  • S003 extract the value of the register B in the routing node (2, 1), and determine whether there is a valid multicast step size in the register B.
  • the value of register B here is 0x02, which is a valid multicast step size, and the multicast step size is 2.
  • S004. Determine, according to the multicast direction information (Y direction) and the multicast step information (2 steps), the destination node address of the routing packet for multicasting is (2, 3), and routing the routing packet to the target routing node (2) 3), and send the valid data in the routing packet to the neuromorphic processing unit connected to the routing node (2, 3).
  • the multicast routing information (including the multicast control information and the multicast step information) is stored in the routing node, and when the routing packet arrives at the routing node, the routing node is multicast by the routing node according to the routing rule in the routing node. Since the multicast routing information is no longer included in the routing packet, the amount of information in the routing packet is reduced, which can effectively improve the routing efficiency of the routing packet, reduce the occupation of the network resource by the routing packet in the routing process, and the multicast routing information does not need to be in the routing information. Configured in each generated routing packet, the tedious task of configuring multicast routing information in each routing packet is avoided.
  • the source routing node (1, 0) sends a routing packet to the destination routing node (1, 1).
  • S001 Send the valid data in the routing packet to the neuromorphic processing unit connected to the routing node (1, 1).
  • S002 Extract the value of the register A in the routing node (1, 1), determine whether to perform the multicast operation according to the value of the register A, and extract the multicast direction information when the multicast control information is valid.
  • the value of register A is 01, and the routing packet needs to be multicast, and the multicast direction is the X direction.
  • S003 Extract the value of the register B in the routing node (1, 1), and determine whether there is a valid multicast step size in the register B.
  • the value of register B here is 0x03, which is a valid multicast step size, and the multicast step size is 3.
  • S004 Determine, according to the multicast direction information (X direction) and the multicast step information (3 steps), the destination node address of the routing packet for multicasting is (4, 1), and routing the routing packet to the target routing node (4) , 1), and send the valid data in the routing packet to the neuromorphic processing unit connected to the routing node (4, 1).
  • the foregoing multicast process stores the multicast routing information in the routing node instead of being configured in the routing packet, and the amount of information in the routing packet is reduced, which can effectively improve the routing efficiency of the routing packet and reduce the occupation of the network resource by the routing packet in the routing process.
  • the multicast routing information does not need to be configured in each generated routing packet, which avoids the cumbersome configuration of multicast routing information in each routing packet.
  • bit width of the register B in the first embodiment and the second embodiment is 8 bits, and the values of 0x02 and 0x03 are expressed in hexadecimal, and the hexadecimal must start with 0x, 0x02.
  • the value converted to binary is: 00000010; the value converted from 0x03 to binary is: 00000011.
  • the value of register B is expressed in hexadecimal form, which is simple and clear.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (Random Access Memory). RAM) and so on.
  • a routing multicast system based on a 2D mesh network comprising: a processor for executing the following program modules stored in a storage medium:
  • the extracting module 100' is configured to extract multicast control information and multicast step information stored locally by the multicast routing node after the multicast routing node receives the routing packet.
  • the obtaining module 200' is configured to extract multicast direction information in the multicast control information when the multicast control information is valid, and acquire a current node address of the multicast routing node.
  • the determining module 300' is configured to determine, according to the current node address and the multicast direction information and the multicast step information, a target node address of the target routing node to which the routing packet is to be routed, and route the routing packet to the target according to the target node address. Routing node.
  • the multicast control information and the multicast step information of the routing packet for the routing multicast process are stored in the routing node in the 2Dmesh network, so that when the multicast control information and the multicast step information are stored, the route is stored.
  • all the routing packets routed by the routing node will be multicast, without the information related to the multicast process in the routing packet, which can reduce the information contained in the routing packet and effectively improve the routing packet.
  • the efficiency of routing packets for multicast routing reduces the occupation of 2D mesh network resources by the multicast process and improves the utilization of 2D mesh network resources.
  • the multicast data in the routing packet is a simple and convenient multicast process.
  • the method further includes: a sending module 100", configured to: after the gambling routing node receives the routing packet, obtain valid data of the routing packet, and send the valid data to the neuromorphic processing unit connected to the multicast routing node. .
  • the obtaining module 200' includes: a first determining unit 210', configured to extract multicast enabling information from the multicast control information, and determine whether the multicast enabling information is valid; if yes, enter the second The determining unit 220'; if not, entering the first control unit 230'.
  • the second determining unit 220' is configured to determine whether the multicast step information has a valid multicast step size, and when there is a valid multicast step, extract the multicast direction information in the multicast control information and obtain the multicast The current node address of the routing node.
  • the first control unit 230' is configured to control the routing packet to end the route.
  • the determining module 300' includes: a third determining unit 310', configured to determine whether the first node address of the first routing node to which the routing packet is currently routed is a target node address; if yes, enter and send The determining unit 320'; if not, entering the second control unit 330'.
  • a sending determining unit 320' configured to send valid data in the routing packet to the target routing node a neural morphology processing unit, and determining whether multicast control information and multicast step information are configured in the target routing node; if yes, determining that the target routing node is a multicast routing node, and extracting the storage of the multicast routing node The multicast control information and the multicast step information; if not, controlling the routing packet to end the route.
  • the second control unit 330' is configured to control the routing packet to continue routing through the 2D mesh network until routing to the target routing node.
  • all routing packets routed from the same multicast routing node have the same destination node address.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present invention provides a routing multicast method and system based on a 2D mesh network. The method comprises: when a source node of a 2D mesh network generates a routing packet, allocating a multicast control section for storing multicast enabling information, multicast direction information, and multicast step size information in the routing packet; extracting a target node address from the routing packet and transmitting the routing packet to a target node by means of a routing network according to the target node address; and extracting the multicast enabling information, the multicast direction information, and the multicast step size information from a multicast routing section, and controlling, according to the multicast enabling information, the multicast direction information, and the multicast step size information, the routing packet to perform multicast routing. The present invention features less network bandwidth occupied, high multicast efficiency, easy implementation, few logic resources occupied, and a low requirement on a routing algorithm.

Description

基于2D mesh网络的路由多播方法及系统Routing multicast method and system based on 2D mesh network
相关申请Related application
本发明申请要求2016年09月20日申请的,申请号为201610834604.5,名称为“基于2D mesh网络的路由多播方法及系统”,以及2016年12月05日申请的,申请号为201611102312.9,名称为“基于2D mesh网络的路由多播方法及系统”的中国专利申请的优先权,在此将其全文引入作为参考。The application for the application of the application on September 20, 2016, the application number is 201610834604.5, the name is "2D mesh network based routing multicast method and system", and the application on December 5, 2016, the application number is 201611102312.9, the name The priority of the Chinese Patent Application for "2D mesh network based routing multicast method and system" is hereby incorporated by reference in its entirety.
技术领域Technical field
本发明涉及片上网络领域,特别是涉及一种基于2D mesh网络的路由多播方法及系统。The present invention relates to the field of on-chip networks, and in particular, to a routing multicast method and system based on a 2D mesh network.
背景技术Background technique
2D mesh网络是片上网络中应用最为广泛的一种网络结构,其优点在于网络具有很强的对称性和可扩展能力,路由算法简单易于分析和实现。The 2D mesh network is the most widely used network structure in the on-chip network. Its advantage is that the network has strong symmetry and scalability, and the routing algorithm is simple and easy to analyze and implement.
2D mesh网络的路由包多播是一个广受关注的问题,寻找一种实现简单、硬件开销小,对网络带宽占用少(高效)的路由多播方法是片上网络设计者的目标。常见的传统路由多播方法主要有基于源节点的多路由包并发式多播和基于包匹配的传输路径上的多播。Routing packet multicasting in 2D mesh networks is a widely-recognized problem. Finding a routing multicast method with simple implementation, low hardware overhead, and low network bandwidth utilization (efficient) is the goal of on-chip network designers. Common traditional route multicast methods mainly include multi-route packet based on source node and multicast on transmission path based on packet matching.
但上述两种路由多播方法在应用过程中存在各自的限制和缺点:基于源节点的多路由包并发式多播需要在源节点处产生等同于目标节点个数的多个路由包,由于这些路由包中含有大量相同信息,因此会出现网络资源有效利用率低的问题,且在多播路由包较多时尤为明显;基于包匹配的传输路径上的多播需要路由节点具有包过滤功能,同时传输路径需要包含所有目标节点,此过程对于路由算法的制定有较高的要求。However, the above two routing multicast methods have their own limitations and disadvantages in the application process: multi-route packet based on source node concurrent multicast needs to generate multiple routing packets equivalent to the number of target nodes at the source node, due to these The routing packet contains a large amount of the same information, so the problem of low effective utilization of network resources occurs, and it is especially obvious when there are many multicast routing packets. The multicasting on the transmission path based on packet matching requires the routing node to have packet filtering. The transmission path needs to include all target nodes. This process has high requirements for the development of routing algorithms.
发明内容Summary of the invention
鉴于此,有必要针对传统路由多播方法存在网络资源利用率低及路由算法要求高的问题,提供一种提高路由多播效率,降低多播过程对网络资源占用的基于2D mesh网络的路由多播方法及系统。In view of this, it is necessary to solve the problem that the traditional routing multicast method has low network resource utilization and high routing algorithm requirements, and provides a route based on 2D mesh network that improves the efficiency of routing multicast and reduces the occupation of network resources by the multicast process. Broadcast method and system.
一种基于2D mesh网络的路由多播方法,多播信息存储于路由包中,所述方法包括:A routing multicast method based on a 2D mesh network, in which multicast information is stored in a routing packet, the method comprising:
在2D mesh网络的源节点生成路由包时,在所述路由包中分配储存多播信息的多播控制区段,所述多播信息包括多播使能信息、多播方向信息和多播步长信息; When a source node of the 2D mesh network generates a routing packet, a multicast control section storing multicast information is allocated in the routing packet, the multicast information including multicast enabling information, multicast direction information, and multicast step Long message
由所述路由包中提取目标节点地址,并根据所述目标节点地址将所述路由包通过路由网络传输至目标节点;Extracting a target node address from the routing packet, and transmitting the routing packet to the target node by using a routing network according to the target node address;
由所述多播路由区段中提取所述多播使能信息、所述多播方向信息和所述多播步长信息,并根据所述多播使能信息、所述多播方向信息和所述多播步长信息控制所述路由包进行多播路由。Extracting, by the multicast routing section, the multicast enabling information, the multicast direction information, and the multicast step information, and according to the multicast enabling information, the multicast direction information, and The multicast step information controls the routing packet to perform multicast routing.
一种基于2D mesh网络的路由多播系统,所述系统包括:处理器,所述处理器用于执行存储在存储介质中的以下程序模块:A routing multicast system based on a 2D mesh network, the system comprising: a processor for executing the following program modules stored in a storage medium:
分配模块,用于当在2D mesh网络的源节点生成路由包时,在所述路由包中分配储存多播信息的多播控制区段,所述多播信息包括多播使能信息、多播方向信息和多播步长信息;An allocation module, configured to allocate a multicast control section storing multicast information, where the multicast information includes multicast enable information, multicast, when a routing packet is generated by a source node of the 2D mesh network Direction information and multicast step information;
路由传输模块,用于由所述路由包中提取目标节点地址,并根据所述目标节点地址将所述路由包通过路由网络传输至目标节点;a routing transmission module, configured to extract a target node address from the routing packet, and transmit the routing packet to the target node by using a routing network according to the target node address;
多播控制模块,用于由所述多播路由区段中提取所述多播使能信息、所述多播方向信息和所述多播步长信息,并根据所述多播使能信息、所述多播方向信息和所述多播步长信息控制所述路由包进行多播路由。a multicast control module, configured to extract, by the multicast routing segment, the multicast enable information, the multicast direction information, and the multicast step information, and according to the multicast enable information, The multicast direction information and the multicast step information control the routing packet for multicast routing.
上述基于2D mesh网络的路由多播方法及系统,在2D mesh网络的源节点处生成的路由包包括多播使能信息、多播方向信息和多播步长信息,该路由包在未开始多播的这段网络路径中只需一个路由包来完成路由包的传输,在路由包进行多播时,再在目标节点上根据多播使能信息、多播方向信息以及多播步长信息控制路由包进行多播路由,因此相比传统的在源节点处就生成多个路由包进行多播路由的方式,其对网络带宽占用较小,多播效率更加高效,并且其实现简单、占用逻辑资源少,无需对路由节点和路由路径制定特殊的算法能力,对路由算法的要求较低。The routing multicast method and system based on the 2D mesh network, the routing packet generated at the source node of the 2D mesh network includes multicast enabling information, multicast direction information, and multicast step information, and the routing packet is not started yet. Only one routing packet is needed to complete the transmission of the routing packet in the network path, and when the routing packet is multicast, it is controlled on the target node according to the multicast enabling information, the multicast direction information, and the multicast step information. The routing packet performs multicast routing. Therefore, compared with the traditional method of generating multiple routing packets at the source node for multicast routing, the network bandwidth is small, the multicast efficiency is more efficient, and the implementation is simple and the logic is occupied. There are few resources, and there is no need to formulate special algorithm capabilities for routing nodes and routing paths, and the requirements for routing algorithms are low.
一种基于2D mesh网络的路由多播方法,多播信息存储于路由节点本地,所述方法包括:A routing multicast method based on a 2D mesh network, where multicast information is stored locally at a routing node, the method comprising:
在多播路由节点接收到路由包后,提取所述多播路由节点本地存储的多播控制信息和多播步长信息;After receiving the routing packet, the multicast routing node extracts multicast control information and multicast step information stored locally by the multicast routing node;
在所述多播控制信息有效时,提取所述多播控制信息中的多播方向信息,并获取所述多播路由节点的当前节点地址;And when the multicast control information is valid, extracting multicast direction information in the multicast control information, and acquiring a current node address of the multicast routing node;
根据所述当前节点地址以及所述多播方向信息和所述多播步长信息确定所述路由包将要路由至的目标路由节点的目标节点地址,并根据所述目标节点地址将所述路由包路由至所述目标路由节点。Determining, according to the current node address, the multicast direction information and the multicast step information, a target node address of a target routing node to which the routing packet is to be routed, and routing the routing packet according to the target node address Routed to the target routing node.
本发明还提供一种基于2D mesh网络的路由多播系统,所述系统包括:处理器,所述处 理器用于执行存储在存储介质中的以下程序模块:The present invention also provides a routing multicast system based on a 2D mesh network, the system comprising: a processor, where The processor is used to execute the following program modules stored in the storage medium:
提取模块,用于在多播路由节点接收到路由包后,提取所述多播路由节点本地存储的多播控制信息和多播步长信息;An extracting module, configured to: after the routing packet is received by the multicast routing node, extract the multicast control information and the multicast step information stored locally by the multicast routing node;
获取模块,用于在所述多播控制信息有效时,提取所述多播控制信息中的多播方向信息,并获取所述多播路由节点的当前节点地址;And an acquiring module, configured to: when the multicast control information is valid, extract the multicast direction information in the multicast control information, and obtain a current node address of the multicast routing node;
确定模块,用于根据所述当前节点地址以及所述多播方向信息和所述多播步长信息确定所述路由包将要路由至的目标路由节点的目标节点地址,并根据所述目标节点地址将所述路由包路由至所述目标路由节点。a determining module, configured to determine, according to the current node address, the multicast direction information, and the multicast step information, a target node address of a target routing node to which the routing packet is to be routed, and according to the target node address Routing the routing packet to the target routing node.
上述基于2D mesh网络的路由多播方法及系统,将路由包进行路由多播过程的多播控制信息和多播步长信息存储在2D mesh网络中的路由节点中,这样当存储有多播控制信息和多播步长信息的路由节点接收到路由包后,所有以该路由节点进行路由的路由包均会被多播,而无需在路由包中与多播过程相关的信息,这样可以减少路由包中包含的信息,能够有效提高路由包进行多播路由时的效率,降低多播过程对2D mesh网络资源的占用,提高2D mesh网络资源的利用率。同时,对于一个路由节点与多个神经形态处理单元连接的2D mesh网络,无需在每个路由包生成时都为之配置相应的多播路由信息也能够完成相应的多播过程,可以简单地实现以路由节点为单位的路由包中有效数据的复制,多播过程简单方便。The routing multicast method and system based on the 2D mesh network store the multicast control information and the multicast step information of the routing packet in the routing multicast process in the routing node in the 2D mesh network, so that when the multicast control is stored After the routing node of the information and multicast step information receives the routing packet, all routing packets routed by the routing node are multicast, without the information related to the multicast process in the routing packet, which can reduce the routing. The information contained in the packet can effectively improve the efficiency of routing packets for multicast routing, reduce the occupation of 2D mesh network resources by the multicast process, and improve the utilization of 2D mesh network resources. At the same time, for a 2D mesh network in which a routing node is connected to multiple neuromorphic processing units, it is not necessary to configure corresponding multicast routing information for each routing packet to complete the corresponding multicasting process, which can be simply implemented. The multicast data in the routing packet is a simple and convenient multicast process.
附图说明DRAWINGS
图1为一个实施例中路由包格式的结构示意图;1 is a schematic structural diagram of a routing packet format in an embodiment;
图2为一个实施例中的基于2D mesh网络的路由多播方法的流程示意图;2 is a schematic flowchart of a route multicasting method based on a 2D mesh network in an embodiment;
图3为另一个实施例中的基于2D mesh网络的路由多播方法的流程示意图;3 is a schematic flowchart of a route multicast method based on a 2D mesh network in another embodiment;
图4为又一个实施例中的基于2D mesh网络的路由多播方法的流程示意图;4 is a schematic flowchart of a route multicast method based on a 2D mesh network in still another embodiment;
图5为实施例一中的基于2D mesh网络的路由多播的过程示意图;5 is a schematic diagram of a process of routing multicast based on a 2D mesh network in Embodiment 1;
图6为实施例一中的路由包格式的结构示意图;6 is a schematic structural diagram of a routing packet format in Embodiment 1;
图7为实施例二中的基于2D mesh网络的路由多播的过程示意图;7 is a schematic diagram of a process of routing multicast based on a 2D mesh network in Embodiment 2;
图8为实施例二中的路由包格式的结构示意图;8 is a schematic structural diagram of a routing packet format in Embodiment 2;
图9为实施例三中的基于2D mesh网络的路由多播的过程示意图;9 is a schematic diagram of a process of routing multicast based on a 2D mesh network in Embodiment 3;
图10为实施例三中的路由包格式的结构示意图;10 is a schematic structural diagram of a routing packet format in Embodiment 3;
图11为一个实施例中基于2D mesh网络的路由多播系统的结构示意图。FIG. 11 is a schematic structural diagram of a routing multicast system based on a 2D mesh network in an embodiment.
图12为一个实施例中的2D mesh网络的串行路由多播方法的流程示意图; 12 is a schematic flow chart of a serial routing multicast method of a 2D mesh network in an embodiment;
图13为一个实施例中的图12中步骤S200的流程示意图;FIG. 13 is a schematic flowchart of step S200 in FIG. 12 in an embodiment; FIG.
图14为一个实施例中的图12中步骤S300的流程示意图;FIG. 14 is a schematic flowchart of step S300 in FIG. 12 in an embodiment; FIG.
图15为一个实施例中的2D mesh网络中路由节点排列示意图;15 is a schematic diagram of a routing node arrangement in a 2D mesh network in an embodiment;
图16为实施例四中的基于2D mesh网络的路由多播的过程示意图;16 is a schematic diagram of a process of routing multicast based on a 2D mesh network in Embodiment 4;
图17为实施例五中的基于2D mesh网络的路由多播的过程示意图;17 is a schematic diagram of a process of routing multicast based on a 2D mesh network in Embodiment 5;
图18为一个实施例中基于2D mesh网络的路由多播系统的结构示意图。FIG. 18 is a schematic structural diagram of a routing multicast system based on a 2D mesh network in an embodiment.
具体实施方式detailed description
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例对本发明基于2D mesh网络的路由多播方法及系统进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本发明,并不用于限定本发明。In order to make the objectives, technical solutions and advantages of the present invention more clear, the routing multicast method and system based on the 2D mesh network of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
路由多播方法主要包括多播信息及其传输控制,多播信息包括多播控制信息、多播方向信息和多播步长信息;所述多播信息可以存储在源节点生成的路由包中,或者在节点本地路由控制表中,或者分别存储在路由包和路由节点本地。基于上述多播信息及路由控制方法实现2D mesh网络的一维或者2维路由多播。The routing multicast method mainly includes multicast information and transmission control thereof, and the multicast information includes multicast control information, multicast direction information, and multicast step information; the multicast information may be stored in a routing packet generated by a source node, Either in the node local routing control table, or stored locally in the routing packet and routing node. The one-dimensional or two-dimensional route multicast of the 2D mesh network is implemented based on the above multicast information and route control method.
在一个实施例中,如图1、图2所示,提供了一种基于2D mesh网络的路由多播方法,该方法包括以下步骤:In an embodiment, as shown in FIG. 1 and FIG. 2, a route multicast method based on a 2D mesh network is provided, and the method includes the following steps:
S100,在2D mesh网络的源节点生成路由包时,在路由包中分配储存多播控制区段1001、多播方向信息1002和多播步长信息1003的多播控制区段1000。S100. When the source node of the 2D mesh network generates the routing packet, the multicast control section 1000 storing the multicast control section 1001, the multicast direction information 1002, and the multicast step information 1003 is allocated in the routing packet.
S200,由路由包中提取目标节点地址2000,并根据目标节点地址2000将路由包通过路由网络传输至目标节点。S200: Extract a target node address 2000 from the routing packet, and transmit the routing packet to the target node according to the target node address 2000 through the routing network.
S300,由多播路由区段中提取多播使能信息1001、多播方向信息1002和多播步长信息1003,并根据多播使能信息1001、多播方向信息1002和多播步长信息1003控制路由包进行多播路由。S300. Extract multicast enable information 1001, multicast direction information 1002, and multicast step information 1003 from the multicast routing section, and according to the multicast enable information 1001, the multicast direction information 1002, and the multicast step information. The 1003 controls the routing packet for multicast routing.
本实施例中,参见图1,2D mesh网络在源节点生成的路由包中包括多播使能信息1001、多播方向信息1002、多播步长信息1003,以及路由包将要传送至的目标节点地址2000和路由包自身携带的有效负载数据3000;将路由包多播路由至相应的目标节点的目的,即是将有效负载数据3000输送至相应的目标节点,供目标节点分析处理。在生成路由包时,在路由包中预留一定的区间来储存多播控制区段1001、多播方向信息1002和多播步长信息1003等与 路由多播相关的信息。首先根据路由包中的目标节点地址2000将路由包通过路由网络传输至目标节点,在将路由包输送至目标节点后,根据路由包中的多播使能信息1001、多播方向信息1002和多播步长信息1003控制该路由包进行多播路由。由于该路由包中包含有多播控制区段1000,因此不必在源节点处就生成与多播路由节点相应的多个路由包,路由包从源节点输送至目标节点这段网络传输过程中只需一个路由包,在此网络传输过程中路由包采用的是点到点的网络传输方式,即在未开始多播的这段网络路径中只需一个路由包来完成路由包的传输,在路由包进行多播时,再在目标节点上根据多播控制区段1001、多播方向信息1002以及多播步长信息1003生成新的路由包,将新的路由包进行多播路由,因此相比传统的在源节点处就生成多个路由包进行多播路由的方式,其对网络带宽占用较小,多播效率更加高效,尤其在连续多播过程时效果更为明显。并且本实施例中的路由多播方法实现简单、占用逻辑资源少,无需对路由节点和路由路径制定特殊的算法能力,其采用传统的路由算法,例如:XY维序路由算法、YX维序路由算法等,便能实现路由包的传输,对路由算法的要求较低。In this embodiment, referring to FIG. 1, the 2D mesh network includes multicast enable information 1001, multicast direction information 1002, multicast step information 1003, and a target node to which the routing packet is to be transmitted, in the routing packet generated by the source node. The address 2000 and the payload data carried by the routing packet itself are 3000; the purpose of routing the routing packet multicast to the corresponding target node is to deliver the payload data 3000 to the corresponding target node for analysis and processing by the target node. When generating the routing packet, a certain interval is reserved in the routing packet to store the multicast control section 1001, the multicast direction information 1002, and the multicast step information 1003, and the like. Routing multicast related information. First, according to the target node address 2000 in the routing packet, the routing packet is transmitted to the target node through the routing network, and after the routing packet is delivered to the target node, according to the multicast enabling information 1001 in the routing packet, and the multicast direction information 1002 and more The broadcast step information 1003 controls the routing packet for multicast routing. Since the routing packet includes the multicast control section 1000, it is not necessary to generate multiple routing packets corresponding to the multicast routing node at the source node, and the routing packet is transported from the source node to the destination node. A routing packet is required. In this network transmission process, the routing packet adopts a point-to-point network transmission mode, that is, only one routing packet is needed to complete the transmission of the routing packet in the network path that does not start multicasting, in the routing. When the packet is multicast, a new routing packet is generated on the target node according to the multicast control section 1001, the multicast direction information 1002, and the multicast step information 1003, and the new routing packet is multicasted, so Traditionally, multiple routing packets are generated at the source node for multicast routing. The network bandwidth is small and the multicast efficiency is more efficient, especially in the continuous multicast process. Moreover, the routing multicast method in this embodiment is simple to implement, and occupies less logical resources, and does not need to formulate special algorithm capabilities for routing nodes and routing paths, and adopts traditional routing algorithms, such as: XY-dimensional routing algorithm, YX-dimensional routing. Algorithms, etc., can realize the transmission of routing packets, and have lower requirements on routing algorithms.
在一个实施例中,在路由包中分配储存多播使能信息、多播方向信息和多播步长信息的多播控制区段的步骤包括:In one embodiment, the step of allocating a multicast control section storing multicast enablement information, multicast direction information, and multicast step size information in the routing packet includes:
获取路由包进行多播路由的多播目标节点信息,根据多播目标节点信息查询预设的多播信息表,在预设的多播信息表中查询得到与多播目标节点信息相匹配的多播使能信息、多播方向信息和多播步长信息,并储存在路由包的多播控制区段;或者获取路由包中的有效负载数据,根据有效负载数据的索引信息查询预设的多播信息表,在预设的多播信息表中查询得到与索引信息相匹配的的多播使能信息、多播方向信息和多播步长信息,并储存在路由包的多播控制区段。Obtaining the multicast destination node information of the routing packet for multicast routing, querying the preset multicast information table according to the multicast target node information, and querying in the preset multicast information table to obtain more matching information with the multicast target node information. The broadcast enable information, the multicast direction information, and the multicast step information are stored in the multicast control section of the routing packet; or the payload data in the routing packet is obtained, and the preset information is queried according to the index information of the payload data. The broadcast information table queries the preset multicast information table to obtain the multicast enable information, the multicast direction information, and the multicast step information that match the index information, and stores the information in the multicast control section of the routing packet. .
其中,多播目标节点信息包括多播目标节点的数量、多播目标节点地址以及多播目标节点之间的连接关系。索引信息指的是根据有效负载数据的大小、类型等属性信息为有效负载数据制定的索引号等信息,属性相同或相近的有效负载数据具有相同的索引信息,每个索引信息在预设的多播信息表中对应唯一的多播信息。The multicast target node information includes a number of multicast target nodes, a multicast target node address, and a connection relationship between the multicast target nodes. The index information refers to information such as an index number set for the payload data according to the attribute information such as the size and type of the payload data, and the payload data having the same or similar attributes has the same index information, and each index information is preset. Corresponding unique multicast information in the broadcast information table.
需要说明的是,多播控制区段的区间大小可根据查询得到的多播信息的大小进行调整,也可根据经验预先设定。预设的多播信息表可根据经验预先设定。It should be noted that the interval size of the multicast control section may be adjusted according to the size of the multicast information obtained by the query, or may be preset according to experience. The preset multicast information table can be preset according to experience.
在一个实施例中,在根据目标节点地址2000将路由包通过路由网络传输至目标节点的步骤之前包括:In one embodiment, prior to the step of transmitting the routing packet to the destination node via the routing network based on the target node address 2000, the method includes:
判断路由包是否到达目标节点,即判断路由包当前所在的路由节点地址与目标节点地址2000是否一致;若是,则判定路由包到达目标节点;若否,则判定路由包未到达目标节点。 其中,每个路由节点对应唯一的地址信息。Determining whether the routing packet reaches the target node, that is, determining whether the routing node address where the routing packet is currently located is consistent with the target node address 2000; if yes, determining that the routing packet arrives at the target node; if not, determining that the routing packet has not reached the target node. Each routing node corresponds to unique address information.
根据目标节点地址2000将路由包通过路由网络传输至目标节点的步骤包括:The step of transmitting the routing packet to the target node through the routing network according to the target node address 2000 includes:
将路由包通过源节点和目标节点之间的路由节点及输入输出通道传输至目标节点。The routing packet is transmitted to the destination node through the routing node and the input and output channels between the source node and the target node.
具体地,若源节点地址为(0,0),目标节点地址2000为(1,1),若路由包在2Dmesh网络上输送是采用XY维序路由算法,则路由包优先在X方向上路由,因此该路由包从源节点右侧的输出通道输出,(1,0)节点从左侧输入通道接收该路由包,(1,0)节点接收到该路由包后,从(1,0)节点的下侧输出通道输出,(1,1)节点从上侧的输入通道接收该路由包,从而完成该路由包的路由。其中,连接两个路由节点之间的路由通道既可作为输出通道,也可作为输入通道,具体根据使用时的功能而定。Specifically, if the source node address is (0, 0) and the target node address 2000 is (1, 1), if the route packet is transported on the 2Dmesh network by using the XY-dimensional routing algorithm, the routing packet is preferentially routed in the X direction. Therefore, the routing packet is output from the output channel on the right side of the source node, and the (1,0) node receives the routing packet from the left input channel, and the (1,0) node receives the routing packet from (1,0). The lower output channel of the node outputs, and the (1,1) node receives the routing packet from the input channel on the upper side, thereby completing routing of the routing packet. The routing channel connecting the two routing nodes can be used as an output channel or an input channel, depending on the function at the time of use.
在一个实施例中,在判定路由包未到达目标节点时,控制路由包继续通过路由包当前所在路由节点和目标节点之间的路由网络输送,直至将路由包输送至目标节点。In one embodiment, upon determining that the routing packet has not arrived at the destination node, the control routing packet continues to be routed through the routing network between the routing node and the destination node where the routing packet is currently located until the routing packet is delivered to the destination node.
在一个实施例中,参见图2,步骤S300包括:In one embodiment, referring to FIG. 2, step S300 includes:
S310,判断多播控制区段1000中的多播使能信息1001是否有效;若是,则执行步骤S311;若否,则执行步骤S312。S310. Determine whether the multicast enable information 1001 in the multicast control section 1000 is valid. If yes, execute step S311; if no, execute step S312.
S311,根据多播方向信息1002和多播步长信息1003控制路由包进行多播路由;S311. Control the routing packet to perform multicast routing according to the multicast direction information 1002 and the multicast step information 1003.
S312,控制路由包结束路由。S312. Control the routing packet to end the route.
在2D mesh网络的源节点处生成路由包时,会在路由包的多播控制区段1000中分配一个储存多播使能信息1001的空间,该空间大小通常设置为1bit(比特),若该多播使能信息1001用E表示,在一个实施例中,设置E=0时表示不多播,设置E=1时表示多播,此时表示当前路由包为多播路由包,该当前路由包需要进行多播,否则表示当前路由包已传输至相应的目标节点,结束该当前路由包的路由,这样可以避免不必要的路由多播,降低非必要的网络资源占用。When the routing packet is generated at the source node of the 2D mesh network, a space for storing the multicast enabling information 1001 is allocated in the multicast control section 1000 of the routing packet, and the space size is usually set to 1 bit (bit), if The multicast enable information 1001 is represented by E. In one embodiment, setting E=0 means not multicasting, setting E=1 means multicasting, and indicating that the current routing packet is a multicast routing packet, the current route The packet needs to be multicast. Otherwise, it indicates that the current routing packet has been transmitted to the corresponding destination node, and the routing of the current routing packet is ended. This avoids unnecessary routing multicast and reduces unnecessary network resource occupation.
在一个实施例中,判断多播使能信息1001是否有效的步骤进一步包括:In an embodiment, the step of determining whether the multicast enable information 1001 is valid further includes:
判断表示多播使能信息1001的使能标识符E是否为0;若为0,则判定多播使能信息1001无效;若为1,则判定多播使能信息1001有效。It is judged whether or not the enable identifier E indicating the multicast enable information 1001 is 0; if 0, it is determined that the multicast enable information 1001 is invalid; if it is 1, it is determined that the multicast enable information 1001 is valid.
在一个实施例中,参见图3,步骤S311进一步包括:In an embodiment, referring to FIG. 3, step S311 further includes:
S311′,判断多播步长信息1003中是否存在有效的多播步长;若是,则执行步骤S311a;若否,则执行步骤S312。S311', it is determined whether there is a valid multicast step size in the multicast step information 1003; if yes, step S311a is performed; if not, step S312 is performed.
S311a,则根据多播方向信息1002和路由包当前所在的目标节点地址2000更新路由包中的目标节点地址2000,并返回步骤S200。 S311a, the target node address 2000 in the routing packet is updated according to the multicast direction information 1002 and the target node address 2000 where the routing packet is currently located, and returns to step S200.
为了进一步提高多播路由的效率,在判定多播使能信息1001有效之后,进一步判断多播步长信息1003是否为有效的多播步长;如果存在有效的多播步长,则说明该路由包需要进行多播路由,在将路由包进行多播之前,先根据路由包的当前所在目标节点地址2000和路由方向信息更新该路由包将要传输至的新的目标节点地址2000,从而根据新的目标节点地址将路由包通过路由网络传输至新的目标节点,待路由包到达新的目标节点后,重新执行判断多播使能信息是否有效及多播步长信息是否为有效的多播步长的步骤,直至多播步长信息无效,这样能够实时判定该路由包是否需要进行多播路由;如果为无效的多播步长,则说明该路由包已多播完毕,此时只需控制路由包结束路由即可。In order to further improve the efficiency of the multicast routing, after determining that the multicast enable information 1001 is valid, it is further determined whether the multicast step information 1003 is a valid multicast step; if there is a valid multicast step, the route is indicated. The packet needs to be multicasted. Before the routing packet is multicast, the new destination node address 2000 to which the routing packet is to be transmitted is updated according to the current target node address 2000 of the routing packet and the routing direction information, thereby The target node address transmits the routing packet to the new target node through the routing network. After the routing packet arrives at the new target node, it re-executes whether the multicast enabling information is valid and whether the multicast step information is a valid multicast step. The step until the multicast step information is invalid, so that it can determine in real time whether the routing packet needs to be multicast routing; if it is an invalid multicast step, it indicates that the routing packet has been multicast, and only the routing is controlled at this time. The packet ends the route.
值得说明的是,路由包在进行多播路由时,默认每次只进行一个多播步长的路由,这里每一个多播步长可表示一个路由节点间的距离,也可表示多个路由节点间的距离,每一个多播步长表示的距离可预先根据需要设定,因此,可以在获知多播方向信息1002和路由包当前所在的目标节点地址2000后便能得到路由包的下一个目标节点地址。It is worth noting that when routing packets are used for multicast routing, only one multicast step route is used at a time. Each multicast step size can represent the distance between one routing node and multiple routing nodes. The distance between each multicast step can be set in advance according to requirements. Therefore, the next target of the routing packet can be obtained after knowing the multicast direction information 1002 and the target node address 2000 where the routing packet is currently located. Node address.
其中,需要说明的是,路由方向信息D储存在路由包的多播控制区段1000内,在路由包的多播控制区段1000中为多播方向信息D分配一个储存空间,该空间大小通常设置为1bit(比特),也可根据需要设置为多个比特。例如:如果向X、Y方向进行多播路由时,可设置储存多播方向信息的空间大小为2bit,多播方向信息D=01时表示多播方向沿X方向,D=10时表示多播方向沿Y方向,D=11时表示多播方向同时沿X、Y两个方向,D=00表示无效。It should be noted that the routing direction information D is stored in the multicast control section 1000 of the routing packet, and the multicast direction information D is allocated a storage space in the multicast control section 1000 of the routing packet, and the space size is usually Set to 1 bit (bits), or set to multiple bits as needed. For example, if multicast routing is performed in the X and Y directions, the space size for storing the multicast direction information may be set to 2 bits, the multicast direction information D=01 indicates that the multicast direction is along the X direction, and D=10 indicates the multicast. The direction is along the Y direction, and D=11 means that the multicast direction is in both X and Y directions, and D=00 means invalid.
在一个实施例中,步骤S311′包括:In an embodiment, step S311' includes:
获取表示多播步长信息1003的标识符L,判断多播步长L是否为零;若为零,则判定该多播步长信息1003为无效的多播步长,否则,则判定该多播步长为有效的多播步长。Obtaining an identifier L indicating the multicast step size information 1003, determining whether the multicast step size L is zero; if it is zero, determining that the multicast step size information 1003 is an invalid multicast step size; otherwise, determining the multi-step The broadcast step is an effective multicast step size.
值得说明的是,此处的多播步长L的值可以为正值,也可以为负值。正值和负值均为有效的多播步长。正值表示多播路由方向朝向预先设定的正方向进行路由;负值表示多播路由方向朝向预先设定的正方向相反的方向进行路由。例如:设定水平方向为X方向,沿X方向向右为正方向,正值则表示沿X方向向右路由,负值则表示沿X方向向左路由。It is worth noting that the value of the multicast step length L here may be a positive value or a negative value. Both positive and negative values are valid multicast steps. A positive value indicates that the multicast routing direction is routed toward a predetermined positive direction; a negative value indicates that the multicast routing direction is routed in a direction opposite to a predetermined positive direction. For example, set the horizontal direction to the X direction and the positive direction to the right along the X direction. A positive value indicates that the route is routed to the right in the X direction, and a negative value indicates that the route is routed to the left in the X direction.
具体地,在路由包的多播控制区段1000中分配一个储存多播步长信息1003的空间,该空间大小通常设置为3bit,优选的,储存多播步长信息1003的空间大小根据多播步长的最大值进行设置,例如:多播步长的最大值为7,则将该最大值转换为二进制码为111;此时设置储存多播步长信息1003的空间大小为3bit,这样既能满足多播步长的存储,又不浪费存储空间。当然,多播步长信息1003的空间大小也可根据多播目标节点个数进行设置。更进一步地,为了更精确地表示多播步长,在满足多播步长存储的基础上,还分配一个表示该多播步长正 负的符号位,这样如果多播步长的最大值为7,则存储该多播步长的空间设置为4bit。最大位上0表示正值,1表示负值。Specifically, a space for storing the multicast step information 1003 is allocated in the multicast control section 1000 of the routing packet, and the space size is usually set to 3 bits. Preferably, the space size of the storage multicast step information 1003 is based on multicast. Set the maximum value of the step size. For example, if the maximum value of the multicast step is 7, the maximum value is converted to a binary code of 111. At this time, the space size for storing the multicast step information 1003 is set to 3 bits. Can meet the storage of multicast steps without wasting storage space. Of course, the space size of the multicast step information 1003 can also be set according to the number of multicast target nodes. Further, in order to more accurately represent the multicast step size, on the basis of satisfying the multicast step size storage, one is also assigned to indicate that the multicast step size is positive. A negative sign bit, such that if the maximum number of multicast steps is 7, the space in which the multicast step is stored is set to 4 bits. A maximum of 0 indicates a positive value and a 1 indicates a negative value.
在一个实施例中,在执行步骤S311a时还包括:In an embodiment, when performing step S311a, the method further includes:
S311b,更新多播控制区段1000中的多播步长信息1003。S311b, updating the multicast step information 1003 in the multicast control section 1000.
在更新路由包的目标节点地址2000的同时,也更新路由包多播控制区段1000中的多播步长信息1003,从而在当前路由节点上生成新的路由包,该路由包中包含有新的目标节点地址,新的多播步长信息1003,多播使能信息1001和多播方向信息1002,根据新的路由包中的新的目标节点地址,新的多播步长信息,多播使能信息1001和多播方向信息1002确定路由包是否继续进行多播路由并控制多播流程。While updating the target node address 2000 of the routing packet, the multicast step information 1003 in the routing packet multicast control section 1000 is also updated, thereby generating a new routing packet on the current routing node, the routing packet including new Destination node address, new multicast step information 1003, multicast enable information 1001 and multicast direction information 1002, multicast based on new target node address in the new routing packet, new multicast step information The enable information 1001 and the multicast direction information 1002 determine whether the routing packet continues to perform multicast routing and control the multicast flow.
具体地,更新多播控制区段1000中的多播步长信息1003的步骤包括:Specifically, the step of updating the multicast step information 1003 in the multicast control section 1000 includes:
若多播步长信息1003为正值时,将多播步长信息1003中表示多播步长的值进行减1操作。若多播步长信息1003为负值时,则将多播步长信息1003中表示多播步长的值进行加1操作。即路由包每进行一步多播过程,该路由包中的多播步长信息1003就更新一次,直至多播步长信息1003中表示多播步长的值更新为0,此时表示该路由包已多播完成,停止对路由包进行多播路由。多播步长信息1003实时反映路由包的多播流程,方便对路由包进行多播控制,也避免进行非必要的多播过程浪费网络资源。If the multicast step information 1003 is a positive value, the value indicating the multicast step size in the multicast step information 1003 is decremented by one. If the multicast step information 1003 is a negative value, the value indicating the multicast step size in the multicast step information 1003 is incremented by one. That is, each time the routing packet performs the multicast process, the multicast step information 1003 in the routing packet is updated once, until the value indicating the multicast step size in the multicast step information 1003 is updated to 0, and the routing packet is represented at this time. Multicast has been completed, and multicast routing of routing packets is stopped. The multicast step size information 1003 reflects the multicast process of the routing packet in real time, facilitates multicast control of the routing packet, and avoids unnecessary networking of unnecessary multicast processes.
在一个实时例中,在将所述路由包输送至目标节点之后,还包括:In a real-time example, after the routing package is delivered to the target node, the method further includes:
S400,由路由包中提取有效负载数据3000,并将有效负载数据3000发送给目标节点连接的本地处理单元。S400: Extract the payload data 3000 from the routing packet, and send the payload data 3000 to the local processing unit connected to the target node.
在路由包进行多播路由及路由传输过程中,路由包中的有效负载数据3000是不变的,因此才能实现路由包中有效负载数据3000在不同路由节点上的多播。各个目标路由节点对应的本地处理单元对有效负载数据3000进行分析处理,从而实现相应的功能。In the process of multicast routing and routing transmission of the routing packet, the payload data 3000 in the routing packet is unchanged, so that the multicasting of the payload data 3000 in the routing packet on different routing nodes can be realized. The local processing unit corresponding to each target routing node analyzes and processes the payload data 3000 to implement the corresponding function.
以下结合几个具体的实施例来对上述基于2D mesh网络的路由多播方法进行详细说明。在以下实施例中,路由节点按2D mesh网络结构排列,每个路由节点通过四对输入输出通道与相邻的路由节点相连构成2D mesh网络。每个路由节点和一个本地处理单元相连。其中,本地处理单元可以为处理器核或其他资源模块。预先设定水平向右为X轴正方向,垂直向下为Y轴正方向,左上处路由节点的路由坐标为(0,0)。The above-mentioned 2D mesh network-based routing multicast method will be described in detail below in conjunction with several specific embodiments. In the following embodiments, the routing nodes are arranged in a 2D mesh network structure, and each routing node is connected to an adjacent routing node through four pairs of input and output channels to form a 2D mesh network. Each routing node is connected to a local processing unit. The local processing unit may be a processor core or other resource module. The preset horizontal direction is the positive direction of the X-axis, and the vertical direction is the positive direction of the Y-axis. The routing coordinates of the routing node at the upper left are (0, 0).
实施例一 Embodiment 1
参见图5、图6,在该实施例中采用XY维序路由算法,路由包格式如图5所示:该路由包多播控制区段1000共占用空间5bit,其中多播使能信息E分配1bit,多播方向信息D分配 1bit,多播步长信息1003用L表示,占用3bit。X[3..0]用于存放目标节点X地址,Y[3..0]用于存放目标节点Y地址,Data[7..0]为8bit有效负载数据。其中,预设E=0时表示不多播,此路由包为点对点的普通路由包,E=1表示多播,此路由包为多播路由包;D=0表示多播方向沿X方向,D=1表示多播方向沿Y方向;多播步长信息L最大值为7,每一个步长表示一个路由节点的距离。如图6所示,图6示出了路由包从源节点(0,0)向路由节点(2,1)、(2,2)、(2,3)多播过程。源节点(0,0)处生成路由包{11010 0010 0001xxxxxxxx},即多播使能信息的位置为1,多播方向信息的位置为1,表示多播方向沿Y方向,多播步长信息位置为2,表示连续多播2个步长,目标节点地址为(2,1),有效负载数据用x表示。Referring to FIG. 5 and FIG. 6, in this embodiment, an XY-dimensional routing algorithm is adopted, and the routing packet format is as shown in FIG. 5: the routing packet multicast control section 1000 occupies a space of 5 bits, wherein the multicast enabling information E is allocated. 1bit, multicast direction information D allocation 1 bit, the multicast step size information 1003 is represented by L, occupying 3 bits. X[3..0] is used to store the target node X address, Y[3..0] is used to store the target node Y address, and Data[7..0] is the 8-bit payload data. The preset E=0 indicates that the multicast packet is not multicast. The routing packet is a point-to-point common routing packet, E=1 indicates multicast, and the routing packet is a multicast routing packet; D=0 indicates that the multicast direction is along the X direction. D=1 indicates that the multicast direction is along the Y direction; the multicast step size information L has a maximum value of 7, and each step indicates the distance of one routing node. As shown in FIG. 6, FIG. 6 shows a routing packet routing process from source node (0, 0) to routing node (2, 1), (2, 2), (2, 3). The routing packet {11010 0010 0001xxxxxxxx} is generated at the source node (0, 0), that is, the location of the multicast enable information is 1, and the location of the multicast direction information is 1, indicating that the multicast direction is along the Y direction, and the multicast step information is The position is 2, indicating continuous multicasting of 2 steps, the target node address is (2, 1), and the payload data is represented by x.
根据XY维序路由算法,路由包优先在X方向上路由,因此该多播路由包从源节点右侧输出通道发出,(1,0)节点从左侧输入通道接收到此路由包。(1,0)节点收到路由包后由路由算法单元检测该路由包节点地址信息,确定出路由包需从(1,0)节点右侧输出通道发出,类似地,直至该多播路由包输送至目标节点(2,1),该多播路由包经历路径(0,0)->(1,0)->(2,0)->(2,1)到达目标节点。路由包到达目标节点(2,1)后,将路由包中的有效负载数据发送给本地处理单元,同时进行多播过程。According to the XY-dimensional routing algorithm, the routing packet is preferentially routed in the X direction, so the multicast routing packet is sent from the output channel on the right side of the source node, and the (1, 0) node receives the routing packet from the left input channel. After the (1,0) node receives the routing packet, the routing algorithm unit detects the routing packet node address information, and determines that the routing packet needs to be sent from the right output channel of the (1,0) node, similarly, until the multicast routing packet Delivered to the target node (2, 1), the multicast routing packet goes through the path (0,0)->(1,0)->(2,0)->(2,1) to reach the target node. After the routing packet arrives at the destination node (2, 1), the payload data in the routing packet is sent to the local processing unit, and the multicast process is performed at the same time.
该多播过程主要包括以下几个步骤:检测该路由包的多播使能信息是否为1,若为1则进行多播过程,否则不进行多播过程(该路由包此次路由结束);若多播使能信息为1,检测路由包多播控制区段1000中的多播方向信息和多播步长信息,如果多播步长信息为0,则结束该路由包的路由,否则则根据多播步长信息和多播方向信息确定路由包下一步将要路由至的目标节点地址,由于该路由包中多播控制区段为{11010},每个步长表示一个路由节点距离,因此可确定该路由包下一步将要路由至的目标节点地址为(2,2),同时更新多播步长信息,由于该多播步长信息为正值,因此对该多播步长信息的正值进行减1操作,将多播步长正值更新为001,最终在该目标节点生成新的路由包{11001 0010 0010xxxxxxxx}。新生成的路由包达到节点(2,2)后,继续检测该路由包中的多播步长信息,如果此时多播步长信息为0,则该路由包结束多播路由过程,否则则继续多播过程,由于此路由包中的多播步长信息为1,因此根据多播方向信息(此时多播方向为沿Y轴方向)和该路由包当前所在的目标节点地址确定路由包下一步将要路由至的目标节点地址为(2,3),同时更新该路由包中的多播步长信息为000,最终在目标节点(2,2)处生成新的路由包{11000 0010 0011xxxxxxxx},并将该新的路由包输送至新确定的目标节点(2,3)。新的路由包{11000 0010 0011xxxxxxxx}到达节点(2,3)后,由于此时路由包中的多播步长信息的值为0,因此该路由包多播过程结束,此次路由结束。该路由包完整多播路由路径如图6所示。 The multicast process mainly includes the following steps: detecting whether the multicast enable information of the routing packet is 1, and if it is 1, performing a multicast process; otherwise, the multicast process is not performed (the routing packet ends the route); If the multicast enable information is 1, the multicast direction information and the multicast step information in the routing packet multicast control section 1000 are detected. If the multicast step size information is 0, the routing of the routing packet is ended, otherwise, Determining, according to the multicast step information and the multicast direction information, the destination node address to which the routing packet is to be routed next. Since the multicast control section in the routing packet is {11010}, each step represents a routing node distance, so It can be determined that the destination node to which the routing packet is to be routed is (2, 2), and the multicast step information is updated. Since the multicast step information is positive, the multicast step information is positive. The value is decremented by 1 to update the multicast step positive value to 001, and finally a new routing packet {11001 0010 0010xxxxxxxx} is generated at the target node. After the newly generated routing packet reaches the node (2, 2), it continues to detect the multicast step size information in the routing packet. If the multicast step size information is 0 at this time, the routing packet ends the multicast routing process, otherwise, The multicast process continues. Since the multicast step information in the routing packet is 1, the routing packet is determined according to the multicast direction information (the multicast direction is along the Y-axis direction) and the destination node address where the routing packet is currently located. Next, the destination node address to be routed to is (2, 3), and the multicast step size information in the routing packet is updated to 000, and finally a new routing packet is generated at the target node (2, 2) {11000 0010 0011xxxxxxxx }, and deliver the new routing packet to the newly determined target node (2, 3). After the new routing packet {11000 0010 0011xxxxxxxx} arrives at the node (2, 3), since the value of the multicast step information in the routing packet is 0 at this time, the routing packet multicast process ends and the routing ends. The routing packet complete multicast routing path is shown in Figure 6.
实施例二 Embodiment 2
本实施例在上述2D mesh网络中,采用YX维序路由算法,即路由包先在Y方向路由,再在X方向上进行路由。路由包格式如图7所示:在该路由包中,多播控制区段1000共占用4bit,其中多播使能信息E分配1bit,多播方向信息D分配1bit,多播步长信息L分配2bit。X[3..0]用于存放目标节点X地址,Y[3..0]用于存放目标节点Y地址,Data[7..0]和Extra[7..0]为16bit有效负载数据。其中,预设E=0时表示不多播,此路由包为点对点的普通路由包,E=1表示多播,此路由包为多播路由包;D=0表示多播方向沿X方向,D=1表示多播方向沿Y方向;多播步长信息L最大值为4,每一个步长表示两个路由节点的距离。如图8所示,图8示出了路由包从源节点(0,0)向路由节点(3,1)、(3,3)、(3,5)多播过程。源节点(0,0)处生成路由包{1110 0011 0001xxxxxxxx xxxxxxxx},即多播使能信息的位置为1,多播方向信息的位置为1,表示多播方向沿Y方向,多播步长信息位置为2,表示连续多播2个步长,目标节点地址为(3,1),有效负载数据用x表示。In the foregoing 2D mesh network, the YX-dimensional routing algorithm is adopted, that is, the routing packet is first routed in the Y direction, and then routed in the X direction. The routing packet format is as shown in FIG. 7 : in the routing packet, the multicast control section 1000 occupies 4 bits in total, wherein the multicast enabling information E is allocated 1 bit, the multicast direction information D is allocated 1 bit, and the multicast step information L is allocated. 2bit. X[3..0] is used to store the target node X address, Y[3..0] is used to store the target node Y address, Data[7..0] and Extra[7..0] are 16bit payload data. . The preset E=0 indicates that the multicast packet is not multicast. The routing packet is a point-to-point common routing packet, E=1 indicates multicast, and the routing packet is a multicast routing packet; D=0 indicates that the multicast direction is along the X direction. D=1 indicates that the multicast direction is along the Y direction; the multicast step size information L has a maximum value of 4, and each step indicates the distance between the two routing nodes. As shown in FIG. 8, FIG. 8 shows a multicast process of routing packets from a source node (0, 0) to a routing node (3, 1), (3, 3), (3, 5). The routing packet {1110 0011 0001xxxxxxxx xxxxxxxx} is generated at the source node (0, 0), that is, the location of the multicast enable information is 1, and the location of the multicast direction information is 1, indicating that the multicast direction is along the Y direction, and the multicast step size is The information position is 2, indicating 2 consecutive steps of multicast, the target node address is (3, 1), and the payload data is represented by x.
根据YX维序路由算法,该路由包在2D mesh网络上经历路径(0,0)->(0,1)->(1,1)->(2,1)->(3,1)到达目标节点,在目标节点(3,1)上检测多播使能信息E=1,表示该路由包进行多播路由,再检测多播步长信息L=2,表示该路由包需要连续多播2个步长,该路由包需要进行多播路由,且该路由包的路由方向为Y方向,由于每个步长表示两个路由节点距离,因此根据路由包当前所在的目标节点(3,1)及路由方向确定该路由包下一步将要路由至的目标节点为(3,3),同时更新多播步长信息,将多播步长的值进行减1操作,多播步长信息更新为01,最终在节点(3,1)生成新的路由包{1101 0011 0011xxxxxxxxxxxxxxxx},并根据目标节点(3,3)的地址将新生成的路由包输送至节点(3,3)。类似地,在节点(3,3)检测路由包的多播路径信息L=1,多播路径信息有效,该路由包需要进一步进行多播,在节点(3,3)上生成新的路由包{1100 0011 0101xxxxxxxx xxxxxxxx},并将新的路由包{1100 0011 0101xxxxxxxx xxxxxxxx}传送至新的目标节点(3,5)。在目标节点(3,5)上检测多播路径信息L=0,该多播路径信息无效,此时该路由包的多播路由结束。该路由包完整多播路由路径如图8所示。According to the YX dimension routing algorithm, the routing packet goes through a path (0,0)->(0,1)->(1,1)->(2,1)->(3,1) on the 2D mesh network. When the target node is reached, the multicast enable information E=1 is detected on the target node (3, 1), indicating that the routing packet performs multicast routing, and then detecting the multicast step information L=2, indicating that the routing packet needs to be continuously continuous. Broadcasting 2 steps, the routing packet needs to be multicast routed, and the routing direction of the routing packet is in the Y direction. Since each step indicates the distance between two routing nodes, according to the current destination node of the routing packet (3, 1) and the routing direction determines that the destination node to be routed to the routing packet is (3, 3), and simultaneously updates the multicast step size information, reduces the value of the multicast step size by 1 operation, and updates the multicast step size information. As 01, a new routing packet {1101 0011 0011xxxxxxxxxxxxxxxx} is finally generated at the node (3, 1), and the newly generated routing packet is delivered to the node (3, 3) according to the address of the target node (3, 3). Similarly, at the node (3, 3) detecting the multicast path information L=1 of the routing packet, the multicast path information is valid, the routing packet needs to be further multicasted, and a new routing packet is generated on the node (3, 3). {1100 0011 0101xxxxxxxx xxxxxxxx} and transfer the new routing packet {1100 0011 0101xxxxxxxx xxxxxxxx} to the new destination node (3, 5). The multicast path information L=0 is detected on the target node (3, 5), and the multicast path information is invalid, and the multicast route of the routing packet ends. The routing packet complete multicast routing path is shown in Figure 8.
实施例三Embodiment 3
本实施例在上述2D mesh网络中,采用XY维序路由算法。路由包格式如图9所示:在该路由包中,多播控制区段1000共占用6bit,其中多播使能信息E分配1bit,多播方向信息D分配2bit,多播步长信息L分配3bit。X[3..0]用于存放目标节点X地址,Y[3..0]用于存放目标节点Y地址,Data[7..0]和Extra[7..0]为16bit有效负载数据。其中,预设E=0时表示不多 播,此路由包为点对点的普通路由包,E=1表示多播,此路由包为多播路由包;D=01表示多播方向沿X方向,D=10表示多播方向沿Y方向,D=11表示多播方向同时沿X、Y两个方向,D=00表示无效;多播步长信息L最大值为4,每一个步长表示一个路由节点的距离。如图10所示,图10示出了路由包从源节点(0,0)向路由节点(1,1)、(1,2)、(1,3)、(2,1)、(3,1)、(2,2)多播过程。源节点(0,0)处生成路由包{111010 0001 0001xxxxxxxx xxxxxxxx},即多播使能信息的位置为1,多播方向信息的位置为11,表示多播方向同时沿X、Y两个方向,多播步长信息位置为2,表示连续多播2个步长,目标节点地址为(1,1),有效负载数据用x表示。In this embodiment, in the above 2D mesh network, an XY dimension routing algorithm is adopted. The routing packet format is as shown in FIG. 9 : in the routing packet, the multicast control section 1000 occupies 6 bits in total, wherein the multicast enabling information E is allocated 1 bit, the multicast direction information D is allocated 2 bits, and the multicast step information L is allocated. 3bit. X[3..0] is used to store the target node X address, Y[3..0] is used to store the target node Y address, Data[7..0] and Extra[7..0] are 16bit payload data. . Among them, the preset E=0 means not much Broadcast, this routing packet is a point-to-point common routing packet, E=1 indicates multicast, and this routing packet is a multicast routing packet; D=01 indicates that the multicast direction is along the X direction, and D=10 indicates that the multicast direction is along the Y direction. D=11 indicates that the multicast direction is in both X and Y directions, D=00 means invalid; the multicast step size information L has a maximum value of 4, and each step represents the distance of one routing node. As shown in FIG. 10, FIG. 10 shows a routing packet from a source node (0, 0) to a routing node (1, 1), (1, 2), (1, 3), (2, 1), (3). , 1), (2, 2) multicast process. The routing packet {111010 0001 0001xxxxxxxx xxxxxxxx} is generated at the source node (0, 0), that is, the location of the multicast enable information is 1, and the location of the multicast direction information is 11, indicating that the multicast direction is in both X and Y directions. The multicast step information position is 2, indicating 2 consecutive steps of multicast, the target node address is (1, 1), and the payload data is represented by x.
根据XY维序路由算法,该路由包在2D mesh网络上经历路径(0,0)->(1,0)->(1,1)到达目标节点,在目标节点(1,1)上检测多播使能信息E=1,表示该路由包为多播路由包,检测多播方向信息D=11,表示同时向X、Y两个方向多播,检测多播路径信息L=2,表示需要连续多播2个步长,由于每个步长表示一个路由节点距离,因此在目标节点上最终生成{111001 0001 0010xxxxxxxx xxxxxxxx}和{111001 0010 0001xxxxxxxx xxxxxxxx}两个新的路由包,将路由包{111001 0001 0010xxxxxxxx xxxxxxxx}输送至新的目标节点(1,2),路由包括{111001 0010 0001xxxxxxxx xxxxxxxx}输送至新的目标节点(2,1)。在目标节点(1,2)上,根据检测得到的多播方向信息及多播步长信息生成新的路由包{111000 0001 0011xxxxxxxx xxxxxxxx}和{111000 0010 0010xxxxxxxx xxxxxxxx},并分别把路由包{111000 00010011xxxxxxxx xxxxxxxx}和和{111000 0010 0010xxxxxxxx xxxxxxxx}输送至目标节点(1,3)和(2,2)上,在目标节点(1,3)和(2,2)上,检测得到多播步长信息为0,此时该路由包结束路由。在目标节点(2,1)上,根据检测得到的多播方向信息及多播步长信息生成新的路由包{111000 0011 0001xxxxxxxx xxxxxxxx}和{111000 0010 0010xxxxxxxx xxxxxxxx},并分别把路由包{111000 0011 0001xxxxxxxx xxxxxxxx}和{111000 0010 0010xxxxxxxxxxxxxxxx}输送至目标节点(3,1)和(2,2)上,在目标节点(3,1)和(2,2)上,检测得到多播步长信息为0,此时该路由包结束路由。该路由完成多播路由路径如图10所示。According to the XY-dimensional routing algorithm, the routing packet goes through the path (0,0)->(1,0)->(1,1) on the 2D mesh network to reach the target node, and detects on the target node (1,1). The multicast enable information E=1 indicates that the routing packet is a multicast routing packet, and the multicast direction information D=11 is detected, indicating that the multicast information is multicast to both X and Y directions, and the multicast path information L=2 is detected. It is necessary to continuously multicast 2 steps. Since each step represents a routing node distance, two new routing packets {111001 0001 0010xxxxxxxx xxxxxxxx} and {111001 0010 0001xxxxxxxx xxxxxxxx} are finally generated on the target node, and the routing packet will be routed. {111001 0001 0010xxxxxxxx xxxxxxxx} is delivered to the new target node (1, 2), and the route including {111001 0010 0001xxxxxxxx xxxxxxxx} is delivered to the new target node (2, 1). On the target node (1, 2), generate a new routing packet {111000 0001 0011xxxxxxxx xxxxxxxx} and {111000 0010 0010xxxxxxxx xxxxxxxx} according to the detected multicast direction information and multicast step information, and respectively route the packet {111000 00010011xxxxxxxx xxxxxxxx} and {111000 0010 0010xxxxxxxx xxxxxxxx} are delivered to the target nodes (1, 3) and (2, 2), and the multicast steps are detected on the target nodes (1, 3) and (2, 2). The information is 0, and the routing packet ends the route. On the target node (2, 1), a new routing packet {111000 0011 0001xxxxxxxx xxxxxxxx} and {111000 0010 0010xxxxxxxx xxxxxxxx} are generated according to the detected multicast direction information and multicast step information, and the routing packet is respectively {111000 0011 0001xxxxxxxx xxxxxxxx} and {111000 0010 0010xxxxxxxxxxxxxxxx} are sent to the target nodes (3, 1) and (2, 2), and the multicast step information is detected on the target nodes (3, 1) and (2, 2). 0, the routing packet ends the route. The routing completion multicast routing path is as shown in FIG.
值得说明的是,在该实施例中,多播步长信息的最大值4,即用2bit的空间便能表示该多播步长信息,而本实施例中多播步长信息却占用3bit,这个3bit的空间最高位用来表示多播步长二进制的符号,0表示正值,1表示负值,另外2bit用来表示多播步长的大小。It should be noted that, in this embodiment, the maximum value 4 of the multicast step information, that is, the space of the multicast step can be represented by the space of 2 bits, but in this embodiment, the multicast step information occupies 3 bits. The highest bit of this 3 bit space is used to represent the binary step binary symbol, 0 for positive values, 1 for negative values, and 2 bits for multicast step size.
在一个实施例中,还提供一种计算机可读存储介质,该计算机可读存储介质存储有计算机指令,该计算机指令被处理器执行时,实现上述基于2D mesh网络的路由多播方法的步骤。In one embodiment, a computer readable storage medium is also provided, the computer readable storage medium storing computer instructions that, when executed by a processor, implement the steps of the 2D mesh network based routing multicast method described above.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计 算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。A person of ordinary skill in the art can understand that all or part of the processes in the foregoing embodiment are implemented, and The computer program is programmed to execute the associated hardware, and the program can be stored in a computer readable storage medium, which, when executed, can include the flow of an embodiment of the methods described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
在一个实施例中,如图11所示,还提供了一种基于2D mesh网络的路由多播系统,该系统包括处理器,该处理器用于执行存储在存储介质中的以下程序模块:In one embodiment, as shown in FIG. 11, a routing multicast system based on a 2D mesh network is also provided, the system including a processor for executing the following program modules stored in a storage medium:
分配模块100,用于当在2D mesh网络的源节点生成路由包时,在所述路由包中分配储存多播使能信息1001、多播方向信息1002和多播步长信息1003的多播控制区段1000。The allocating module 100 is configured to allocate multicast control information for storing the multicast enable information 1001, the multicast direction information 1002, and the multicast step information 1003 in the routing packet when the routing node of the 2D mesh network generates the routing packet. Section 1000.
路由传输模块200,用于由所述路由包中提取目标节点地址2000,并根据目标节点地址2000将路由包通过路由网络传输至目标节点。The routing transmission module 200 is configured to extract the target node address 2000 from the routing packet, and transmit the routing packet to the target node according to the target node address 2000 through the routing network.
多播控制模块300,用于由多播路由区段中提取多播使能信息1001、多播方向信息1002和多播步长信息1003,并根据多播使能信息1001、多播方向信息1002和多播步长信息1003控制路由包进行多播路由。The multicast control module 300 is configured to extract the multicast enable information 1001, the multicast direction information 1002, and the multicast step information 1003 from the multicast routing section, and according to the multicast enable information 1001 and the multicast direction information 1002. And multicast step size information 1003 controls the routing packet for multicast routing.
本实施例中的路由多播系统,在2D mesh网络的源节点处生成的路由包包括多播使能信息1001、多播方向信息1002、多播步长信息1003,以及路由包将要传送至的目标节点地址2000和路由包自身携带的有效负载数据,该路由包在未开始多播的这段网络路径中只需一个路由包来完成路由包的传输,在路由包进行多播时,再在目标节点上根据多播使能信息1001、多播方向信息1002以及多播步长信息1003控制路由包进行多播路由,因此相比传统的在源节点处就生成多个路由包进行多播路由的方式,其对网络带宽占用较小,多播效率更加高效,尤其在连续多播过程时效果更为明显。并且本实施例中的路由多播方法实现简单、占用逻辑资源少,无需对路由节点和路由路径制定特殊的算法能力,其采用传统的路由算法便能实现路由包的传输,对路由算法的要求较低。In the routing multicast system in this embodiment, the routing packet generated at the source node of the 2D mesh network includes multicast enabling information 1001, multicast direction information 1002, multicast step information 1003, and a routing packet to be transmitted to. The target node address 2000 and the payload data carried by the routing packet itself, the routing packet only needs one routing packet to complete the transmission of the routing packet in the network path that does not start multicasting, and when the routing packet is multicasted, The target node controls the routing packet to perform multicast routing according to the multicast enable information 1001, the multicast direction information 1002, and the multicast step information 1003, so that multiple routing packets are generated at the source node for multicast routing. The way, the network bandwidth is small, and the multicast efficiency is more efficient, especially in the continuous multicast process. Moreover, the routing multicast method in this embodiment is simple to implement, and occupies less logical resources, and does not need to have a special algorithm capability for the routing node and the routing path, and the routing algorithm can be implemented by using a traditional routing algorithm, and the routing algorithm is required. Lower.
在一个实施例中,多播控制模块300包括:使能判断单元310,用于判断多播控制区段1000中的多播使能信息1001是否有效;若是,则进入多播路由单元311;若否,则进入路由结束单元312。多播路由单元311,用于根据多播方向信息1002和多播步长信息1003控制路由包进行多播路由。路由结束单元312,用于控制路由包结束路由。In an embodiment, the multicast control module 300 includes: an enabling determining unit 310, configured to determine whether the multicast enabling information 1001 in the multicast control section 1000 is valid; if yes, enter the multicast routing unit 311; Otherwise, the route end unit 312 is entered. The multicast routing unit 311 is configured to control the routing packet to perform multicast routing according to the multicast direction information 1002 and the multicast step information 1003. The routing end unit 312 is configured to control the routing packet ending route.
在一个实施例中,多播路由单元311包括:步长判断子单元311′,用于判断多播步长信息1003中是否存在有效的多播步长;若是,则进入目标地址更新子单元311a,并返回路由传输模块200;若否,则进入路由结束单元312。目标地址更新子单元311a,用于根据多播方向信息1002和路由包当前所在的目标节点地址2000更新路由包中的目标节点地址2000。 In an embodiment, the multicast routing unit 311 includes: a step determining subunit 311' for determining whether there is a valid multicast step in the multicast step information 1003; if yes, entering the target address updating subunit 311a And return to the route transmission module 200; if not, enter the route end unit 312. The target address update subunit 311a is configured to update the target node address 2000 in the routing packet according to the multicast direction information 1002 and the target node address 2000 where the routing packet is currently located.
在一个实施例中,多播路由单元311还包括:In an embodiment, the multicast routing unit 311 further includes:
步长更新子单元311b,用于在根据多播方向信息1002和路由包当前所在的目标节点地址2000更新所述路由包中的目标节点地址2000同时,更新多播控制区段1000中的多播步长信息1003。The step update subunit 311b is configured to update the multicast in the multicast control section 1000 while updating the target node address 2000 in the routing packet according to the multicast direction information 1002 and the target node address 2000 where the routing packet is currently located. Step information 1003.
在一个实施例中,还包括:发送模块400,用于在将路由包输送至目标节点之后,由路由包中提取有效负载数据3000,并将有效负载数据3000发送给目标节点连接的本地处理单元。In an embodiment, the method further includes: a sending module 400, configured to: after the routing packet is delivered to the target node, extract the payload data 3000 from the routing packet, and send the payload data 3000 to the local processing unit connected to the target node. .
由于此系统解决问题的原理与前述一种基于2D mesh网络的路由多播方法相似,因此该系统的实施可以参见前述方法的实施,重复之处不再赘述。Since the principle of solving the problem in this system is similar to the foregoing routing multicast method based on the 2D mesh network, the implementation of the system can be referred to the implementation of the foregoing method, and the repeated description is not repeated.
在一个实施例中,如图12所示,提供了一种2D mesh网络的串行路由多播方法,该方法包括以下步骤:In one embodiment, as shown in FIG. 12, a serial routing multicast method for a 2D mesh network is provided, the method comprising the following steps:
S100’,在多播路由节点接收到路由包后,提取多播路由节点本地存储的多播控制信息和多播步长信息。S100', after receiving the routing packet by the multicast routing node, extracting multicast control information and multicast step information stored locally by the multicast routing node.
S200’,在多播控制信息有效时,提取多播控制信息中的多播方向信息,并获取多播路由节点的当前节点地址。S200', when the multicast control information is valid, extracting multicast direction information in the multicast control information, and acquiring a current node address of the multicast routing node.
S300’,根据当前地址信息以及多播方向信息和多播步长信息确定路由包将要路由至的目标路由节点的目标节点地址,并根据目标节点地址将路由包路由至目标路由节点。S300', determining, according to the current address information, the multicast direction information, and the multicast step information, a target node address of the target routing node to which the routing packet is to be routed, and routing the routing packet to the target routing node according to the target node address.
本实施例中,将路由包进行路由多播过程的多播控制信息和多播步长信息存储在2Dmesh网络中的路由节点中,这样当存储有多播控制信息和多播步长信息的路由节点(多播路由节点)接收到路由包后,所有以该路由节点进行路由的路由包均会被多播,相当于多播过程以路由节点为单位进行,而无需在路由包中分配存储多播控制信息和多播步长信息的存储区域,即路由包中只有神经形态处理单元生成的有效数据信息,而不含有与多播过程相关的信息,这样可以减少路由包中包含的信息,能够有效提高路由包进行多播路由时的效率,降低多播过程对2D mesh网络资源的占用,提高2D mesh网络资源的利用率。同时,对于一个路由节点与多个神经形态处理单元连接的2D mesh网络,无需在每个路由包生成时都为之配置相应的多播路由信息也能够完成相应的多播过程,可以简单地实现以路由节点为单位的路由包中有效数据的复制,多播过程简单方便。In this embodiment, the multicast control information and the multicast step information of the routing packet for the routing multicast process are stored in the routing node in the 2Dmesh network, so that when the multicast control information and the multicast step information are stored, the route is stored. After the node (multicast routing node) receives the routing packet, all routing packets routed by the routing node are multicast, which is equivalent to the multicast process in the routing node unit, without having to allocate more storage in the routing packet. The storage area of the broadcast control information and the multicast step information, that is, only the valid data information generated by the neuromorphic processing unit in the routing packet, and does not contain information related to the multicast process, so that the information contained in the routing packet can be reduced, and Effectively improve the efficiency of routing packets for multicast routing, reduce the occupation of 2D mesh network resources by the multicast process, and improve the utilization of 2D mesh network resources. At the same time, for a 2D mesh network in which a routing node is connected to multiple neuromorphic processing units, it is not necessary to configure corresponding multicast routing information for each routing packet to complete the corresponding multicasting process, which can be simply implemented. The multicast data in the routing packet is a simple and convenient multicast process.
其中,需要说明的是,2D mesh网络中可以全部路由节点中都配置多播控制信息和多播步长信息,也可以部分路由节点中配置多播控制信息和多播步长信息。在一个实施例中,多 播控制信息和多播步长信息存储在于路由节点连接的存储单元中。优选的,该存储单元包括存储多播控制信息的第一存储单元和存储多播步长信息的第二存储单元。将多播控制信息和多播步长信息分别存储在两个存储单元,可以减少获取多播控制信息和多播步长信息时在同一存储单元查找的过程,提高多播控制信息和多播步长信息的获取效率,从而提高路由包的多播路由效率。上述第一存储单元和第二存储单元可以为寄存器、内存或硬盘,优选的,存储单元为寄存器,寄存器的读写效率较快,可以进一步提高多播路由的效率。It should be noted that the multicast control information and the multicast step information may be configured in all routing nodes in the 2D mesh network, and the multicast control information and the multicast step information may also be configured in the partial routing node. In one embodiment, more The broadcast control information and the multicast step size information are stored in a storage unit to which the routing node is connected. Preferably, the storage unit comprises a first storage unit storing multicast control information and a second storage unit storing multicast step information. The multicast control information and the multicast step information are respectively stored in two storage units, which can reduce the process of searching in the same storage unit when acquiring the multicast control information and the multicast step information, and improve the multicast control information and the multicast step. The efficiency of obtaining long information, thereby improving the multicast routing efficiency of routing packets. The first storage unit and the second storage unit may be a register, a memory or a hard disk. Preferably, the storage unit is a register, and the read/write efficiency of the register is faster, which can further improve the efficiency of the multicast routing.
值得说明的是,路由包在进行多播路由时,默认每次只进行一个步长的路由,因此,可以在得知路由包当前所在的路由节点的当前节点地址及多播方向信息和多播步长信息之后确认该路由包将要路由至的路由节点的目标节点地址。其中,这里的一个多播步长可表示一个路由节点间的距离,也可表示多个路由节点的距离,每一个多播步长表示的路由节点的距离可预先根据需要设定。It is worth noting that when a routing packet performs multicast routing, it only performs one-step routing at a time. Therefore, it can know the current node address and multicast direction information and multicast of the routing node where the routing packet is currently located. After the step information, confirm the destination node address of the routing node to which the routing packet will be routed. Wherein, a multicast step size herein may indicate a distance between one routing node, and may also indicate a distance of multiple routing nodes, and the distance of the routing node indicated by each multicast step length may be set in advance according to requirements.
在一个实施例中,在多播路由节点接收到路由包后,还包括:In an embodiment, after the routing packet is received by the multicast routing node, the method further includes:
S100”,获取路由包的有效数据,并将有效数据发送给与多播路由节点连接的神经形态处理单元。S100", obtaining valid data of the routing packet, and transmitting the valid data to the neuromorphic processing unit connected to the multicast routing node.
在2D mesh网络中,只要路由包路由至目标路由节点,都将该路由包发送给相应的神经形态处理单元,从而实现相应的神经形态处理单元对路由包中的有效数据进行分析处理,完成相应的功能。In the 2D mesh network, as long as the routing packet is routed to the target routing node, the routing packet is sent to the corresponding neuromorphic processing unit, so that the corresponding neuromorphic processing unit analyzes and processes the valid data in the routing packet, and completes the corresponding The function.
在一个实施例中,参见图13,步骤S200’包括:In one embodiment, referring to Figure 13, step S200' includes:
S210’,由多播控制信息中提取多播使能信息,并判断多播使能信息是否有效;若是,则执行步骤S220’;若否,则执行步骤S230’。S210', extracting the multicast enable information from the multicast control information, and determining whether the multicast enable information is valid; if yes, executing step S220'; if not, executing step S230'.
S220’,判断多播步长信息是否存在有效的多播步长,若是,则执行步骤S221’;若否,则执行步骤S230。S220', determining whether the multicast step size information has a valid multicast step size, and if so, executing step S221'; if not, executing step S230.
S221’,提取多播控制信息中的多播方向信息及获取多播路由节点的当前节点地址。S221', extracting multicast direction information in the multicast control information and acquiring a current node address of the multicast routing node.
S230’,控制路由包结束路由。S230', controlling the routing packet to end the route.
本实施例中是步骤S200’的一个具体实施例,在本实施例中,路由节点是否进行多播过程由多播控制信息和多播步长信息共同决定,在多播控制信息和多播步长信息同时有效时,路由节点才能进行多播过程。In this embodiment, it is a specific embodiment of step S200'. In this embodiment, whether the routing node performs the multicast process is jointly determined by the multicast control information and the multicast step information, in the multicast control information and the multicast step. When the long information is valid at the same time, the routing node can perform the multicast process.
具体地,在一个实施例中,配置多播控制信息A占用的存储空间为2bit(比特,描述电脑数据量的最小单位),多播步长信息B占用的存储空间为8bit。当多播控制信息A的值为00或11时,多播控制信息无效,表示无多播,路由包路由至该路由节点时不进行多播过程, 即路由包达到该路由节点后路由结束;当多播控制信息A的值为01时,多播控制信息有效,表示该路由节点被配置为多播路由节点,即路由包到达该路由节点后还需进行多播过程,并且多播方向为X方向;当多播控制信息A的值为10时,多播控制信息有效,表示该路由节点被配置为多播路由节点,即路由包到达该路由节点后还需要进行多播过程,并且多播方向为Y方向。Specifically, in one embodiment, the storage space occupied by the configuration multicast control information A is 2 bits (bits, the minimum unit describing the amount of computer data), and the storage space occupied by the multicast step information B is 8 bits. When the value of the multicast control information A is 00 or 11, the multicast control information is invalid, indicating that there is no multicast, and the routing packet is not routed to the routing node, and the multicast process is not performed. That is, after the routing packet reaches the routing node, the routing ends; when the value of the multicast control information A is 01, the multicast control information is valid, indicating that the routing node is configured as a multicast routing node, that is, after the routing packet arrives at the routing node, The multicast process is required, and the multicast direction is the X direction. When the value of the multicast control information A is 10, the multicast control information is valid, indicating that the routing node is configured as a multicast routing node, that is, the routing packet arrives at the route. The multicast process is also required after the node, and the multicast direction is the Y direction.
当确定多播控制信息有效时,即获得的多播控制信息为10和01时,到达该路由节点的路由包需要进行多播,此时需要进一步的获取该路由节点的多播步长信息来确定路由包的目标节点地址。当多播步长信息B的值为0时,多播步长信息中不存在有效的多播步长,此时多播仍无效,该路由节点不进行多播;当多播步长信息B的值为非零时,根据多播步长信息中的多播步长和多播方向信息中的多播方向确定路由包将要路由至的目标路由节点。When it is determined that the multicast control information is valid, that is, when the obtained multicast control information is 10 and 01, the routing packet that arrives at the routing node needs to be multicast, and the multicast step information of the routing node needs to be further obtained. Determine the destination node address of the routing packet. When the value of the multicast step information B is 0, there is no valid multicast step size in the multicast step information, and the multicast is still invalid, the routing node does not perform multicast; when the multicast step information B When the value of the value is non-zero, the target routing node to which the routing packet is to be routed is determined according to the multicast step size in the multicast step information and the multicast direction in the multicast direction information.
其中,上述实施例中配置多播控制信息A的值为00或11时,表示无多播,这里只是为了便于说明,并不用于限定。在其他的实施例中,也可配置多播控制信息A的值为00时,表示无多播,多播控制信息A的值为11表示有多播过程,且多播的方向为同时向X和Y方向。When the value of the multicast control information A in the above embodiment is 00 or 11, it means that there is no multicast, which is for convenience of description and is not limited. In other embodiments, when the value of the multicast control information A is 00, it means that there is no multicast, and the value of the multicast control information A is 11, indicating that there is a multicast process, and the direction of the multicast is simultaneous to the X. And Y direction.
优选地,在一个实施例中,从相同的多播路由节点路由的所有路由包具有相同的目标节点地址。即某一路由节点配置好多播路由信息之后,通常不随意变动,所有以该多播路由节点发送的路由包将要路由至的目标路由节点相同,提高2D mesh网络多播路由为稳定性。更进一步地,从相同的多播路由节点发送的所有路由包具有一个方向的目标节点地址(只有一个目标路由节点)。即路由包在以某个路由节点为多播路由节点执行多播过程时,多播方向为一个,多播方向要么是X方向,要么是Y方向,这样保证路由包在执行多播过程时是串行执行的,不会出现同时向多个方向多播时调用的目标路由节点太多和同一路由节点被很多个路由节点调用为目标路由节点的问题,避免多个方向多播路径复杂及陷入循环多播的现象。在2D mesh网络应用于神经形态计算领域时,路由包在路由时除了点对点的连接关系外,还会涉及大量一对多(一个源路由节点对应多个目标路由节点)的多播路由的连接关系,这样往往会带来神经形态处理单元扇入扇出不足的问题,即一个神经形态处理单元可能需要同时分析处理多个路由包,或一个神经形态处理单元生成的路由包被多个其它的神经形态计算单元分析处理,而设置路由包以某个路由节点为多播源节点执行多播时只向一个路由方向路由,可以很好地解决神经形态处理单元扇入扇出不足的问题。Preferably, in one embodiment, all routing packets routed from the same multicast routing node have the same destination node address. That is, after a certain routing node is configured with multicast routing information, it is usually not arbitrarily changed. All the routing packets sent by the multicast routing node will be routed to the same destination routing node, and the multicast routing of the 2D mesh network is improved. Further, all routing packets sent from the same multicast routing node have a target node address in one direction (only one destination routing node). That is, when the routing packet performs a multicast process by using a routing node as a multicast routing node, the multicast direction is one, and the multicast direction is either the X direction or the Y direction, so that the routing packet is guaranteed to be executed during the multicast process. Serial execution does not cause too many target routing nodes to be called when multicasting in multiple directions at the same time, and the same routing node is called as a destination routing node by many routing nodes, avoiding complicated multicast paths in multiple directions. The phenomenon of cyclic multicast. When the 2D mesh network is applied to the field of neural morphology calculation, in addition to the point-to-point connection relationship, the routing packet involves the connection relationship of a large number of one-to-many (one source routing node corresponding to multiple target routing nodes). This often leads to the problem of insufficient fan-in fanout of the neuromorphic processing unit, that is, a neuromorphic processing unit may need to analyze and process multiple routing packets at the same time, or a routing packet generated by a neuromorphic processing unit may be used by multiple other nerves. The morphological calculation unit analyzes and processes, and sets the routing packet to route only one routing direction when a routing node performs multicast for the multicast source node, which can well solve the problem of insufficient fan-in fanout of the neuromorphic processing unit.
需要说明的是,上述以某个路由节点为单位执行多播只向一个路由方向路由指的是一次多播过程中只有一个路由方向,而不是在整个2D mesh网络执行多次多播过程中只有一个路 由方向。例如:以路由节点E为多播路由节点执行多播时的多播方向只为X方向,当路由包到达目标路由节点F时,目标路由节点F作为新的多播路由节点执行多播时的多播方向可以只为Y方向,也可以只为X方向。It should be noted that performing multicast on a routing node unit only to one routing direction means that there is only one routing direction in a multicast process, instead of performing multiple multicast processes in the entire 2D mesh network. One way By direction. For example, when the routing node E performs multicast for the multicast routing node, the multicast direction is only the X direction. When the routing packet arrives at the destination routing node F, the target routing node F performs multicast as a new multicast routing node. The multicast direction can be only the Y direction or only the X direction.
在一个实施例中,参见图14,步骤S300’包括:In one embodiment, referring to Figure 14, step S300' includes:
S310’,判断路由包当前路由至的第一路由节点的第一节点地址是否为目标节点地址;若是,则执行步骤S320’;若否,则执行步骤S330’。S310', determining whether the first node address of the first routing node to which the routing packet is currently routed is the target node address; if yes, executing step S320'; if not, executing step S330'.
S320’,判定第一路由节点为目标路由节点,将路由包中的有效数据发送给与目标路由节点连接的神经形态处理单元,并判断目标路由节点中是否配置了多播控制信息和多播步长信息;若是,则执行步骤S321’;若否,则执行步骤S322’。S320', determining that the first routing node is the target routing node, sending the valid data in the routing packet to the neuromorphic processing unit connected to the target routing node, and determining whether the multicast routing information and the multicast step are configured in the target routing node. Long message; if yes, step S321' is performed; if not, step S322' is performed.
S321’,则确定目标路由节点为多播路由节点,并提取多播路由节点存储的多播控制信息和多播步长信息。S321', determining that the target routing node is a multicast routing node, and extracting multicast control information and multicast step information stored by the multicast routing node.
S322’,控制路由包结束路由。S322', controlling the routing packet to end the route.
S330’,控制路由包通过2D mesh网络继续路由,直至路由至目标路由节点。S330', the control routing packet continues to be routed through the 2D mesh network until it is routed to the target routing node.
路由包在2D mesh网络中路由时,每到达一个路由节点,就判断该路由节点的节点地址是否为目标节点地址,即判断路由包是否到达目标路由节点,如果到达的路由节点为目标路由节点,将路由包的有效数据发送给目标路由节点相应的神经形态处理单元中供其分析处理,然后判断该目标路由节点中是否配置的多播控制信息和多播步长信息(即判断该目标路由节点是否为多播路由节点),如果配置了,就提取该多播路由节点中的多播控制信息和多播步长信息,并执行下一个多播过程,实现多播过程的串行连续;如果没有配置,则说明该目标路由节点不是多播路由节点,不执行多播过程,该路由包的多播过程结束。When a routing packet is routed in a 2D mesh network, each time a routing node arrives, it is determined whether the node address of the routing node is the destination node address, that is, whether the routing packet reaches the target routing node, and if the arriving routing node is the target routing node, Sending the valid data of the routing packet to the corresponding neuromorphic processing unit of the target routing node for analysis and processing, and then determining whether the multicast routing information and the multicast step information are configured in the target routing node (ie, determining the target routing node) Whether it is a multicast routing node), if configured, extracts multicast control information and multicast step information in the multicast routing node, and performs the next multicast process to implement serial continuity of the multicast process; If the configuration is not configured, the target routing node is not a multicast routing node, and the multicast process is not performed. The multicast process of the routing packet ends.
值得说明的是,在上述实施例中,一个路由节点被配置为多播路由节点的同时(在该路由节点中存储有多播控制信息和多播步长信息),可以为其它多播路由节点的目标路由节点。即当路由包从一个多播路由节点到达目标路由节点后,如果该目标路由节点也为多播路由节点,则该路由包继续执行多播过程,直至该路由包所到达的目标路由节点不是多播路由节点。即路由包在2D mesh网络中的多播过程可以是串行连续的,且多播次数不受限制。由于每次多播都是以路由节点为单位的路由包有效数据的复制,因此可以很好地克服传统为每一个路由包都配置多播路由信息的多播过程繁琐的问题,简单方便易于实现,且路由包中含有的信息减少,也有利于提高多播路由的效率,减少对网络资源的占用。It should be noted that, in the above embodiment, one routing node is configured as a multicast routing node (the multicast control information and the multicast step information are stored in the routing node), and may be other multicast routing nodes. The target routing node. That is, after the routing packet arrives at the destination routing node from a multicast routing node, if the target routing node is also a multicast routing node, the routing packet continues to perform the multicast process until the routing packet arrives at a target routing node that is not Broadcast routing node. That is, the multicast process of routing packets in the 2D mesh network can be serially continuous, and the number of multicasts is not limited. Since each multicast is a replication of the effective data of the routing packet in the routing node unit, the problem of the complicated multicast process for configuring the multicast routing information for each routing packet can be well overcome, which is simple and convenient to implement. And the information contained in the routing packet is reduced, which is also beneficial to improve the efficiency of the multicast routing and reduce the occupation of network resources.
为了更清楚的解释上述实施例,以下结合几个具体的实施例来对上述基于2D mesh网络的路由多播方法进行详细说明。在以下实施例中,路由节点按2D mesh网络结构排列,每个 路由节点通过四对输入输出通道与相邻的路由节点相连构成2D mesh网络。每个路由节点可以和一个或多个神经形态处理单元相连。预先设定水平向右为X轴正方向,垂直向下为Y轴正方向,左上处路由节点的路由坐标为(0,0)。In order to explain the above embodiments more clearly, the above-mentioned 2D mesh network-based routing multicast method will be described in detail below in conjunction with several specific embodiments. In the following embodiments, the routing nodes are arranged in a 2D mesh network structure, each The routing node is connected to adjacent routing nodes through four pairs of input and output channels to form a 2D mesh network. Each routing node can be connected to one or more neuromorphic processing units. The preset horizontal direction is the positive direction of the X-axis, and the vertical direction is the positive direction of the Y-axis. The routing coordinates of the routing node at the upper left are (0, 0).
参见图15,2D mesh网络中的各个路由节点设置寄存器A和寄存器B,寄存器A用于存储多播控制信息,寄存器B用于存储多播步长信息,其中寄存器占用2bit位宽,寄存器B占用8bit位宽,即A[1:0],B[7:0]。寄存器A和寄存器B占用的位宽也可根据具体需求而定,这里只用于解释说明,并不用于限定。当寄存器A的值为00或11时,表示无多播,该路由节点不进行多播操作,即路由包到达目标路由节点后即路由结束;当寄存器A的值为01时,表示该路由节点配置为多播路由节点,即路由包到达目标路由节点后还需进行多播操作,并且多播方向为X方向;当寄存器A的值为10时,表示该路由节点配置为多播路由节点,即路由包到达目标路由节点后还需进行多播操作,并且多播方向为Y方向。寄存器A的值为01或10时,该路由节点需进行多播,此时需进一步的根据寄存器B确定多播目标节点。当多播步长寄存器值为0时,多播无效;当寄存器值B为非零值时,目标路由节点根据多播方向和多播步长共同确定。Referring to FIG. 15, each routing node in the 2D mesh network sets register A and register B. Register A is used to store multicast control information, and register B is used to store multicast step information, wherein the register occupies 2 bits and the register B occupies 8bit bit width, ie A[1:0], B[7:0]. The bit width occupied by register A and register B can also be determined according to specific needs, and is for illustrative purposes only and is not intended to be limiting. When the value of the register A is 00 or 11, it means that there is no multicast, and the routing node does not perform the multicast operation, that is, the route ends when the routing packet arrives at the destination routing node; when the value of the register A is 01, the routing node is represented. Configured as a multicast routing node, that is, the routing packet needs to perform multicast operation after reaching the destination routing node, and the multicast direction is the X direction; when the value of the register A is 10, it indicates that the routing node is configured as a multicast routing node. That is, after the routing packet arrives at the destination routing node, multicast operation is required, and the multicast direction is the Y direction. When the value of the register A is 01 or 10, the routing node needs to perform multicast, and the multicast destination node needs to be further determined according to the register B. When the multicast step size register value is 0, the multicast is invalid; when the register value B is non-zero, the target routing node determines jointly according to the multicast direction and the multicast step size.
实施例四Embodiment 4
参见图16,源路由节点(0,0)和(3,1)同时向目标路由节点(2,1)发送路由包,源路由节点通过2D mesh网络中路由节点的路由算法单元向目标路由节点发送路由包时需实时判断是否到达目标路由节点,如果没有到达,则需要通过2D mesh网络继续向下一路由节点发送路由包,如果到达,就将路由包中的有效数据发送给相应的神经形态处理单元。路由节点(2,1)的寄存器A配置为A[1:0]=10,B[7:0]=0x02,则所有以(2,1)为多播路由节点的路由包到达节点(2,1)后,执行以下过程:Referring to Figure 16, the source routing nodes (0, 0) and (3, 1) simultaneously send routing packets to the destination routing node (2, 1), and the source routing node passes the routing algorithm unit of the routing node in the 2D mesh network to the destination routing node. When sending a routing packet, it is necessary to determine in real time whether the target routing node is reached. If it does not arrive, it needs to continue to send the routing packet to the next routing node through the 2D mesh network. If it arrives, the valid data in the routing packet is sent to the corresponding neural configuration. Processing unit. The register A of the routing node (2, 1) is configured as A[1:0]=10, B[7:0]=0x02, then all routing packets arriving at the node with (2,1) as the multicast routing node arrive at the node (2) After 1), perform the following process:
S001,将路由包中的有效数据发送给与路由节点(2,1)相连的神经形态处理单元。S001: Send valid data in the routing packet to a neuromorphic processing unit connected to the routing node (2, 1).
S002,提取路由节点(2,1)中寄存器A的值,根据寄存器A的值确定是否进行多播操作,并在多播控制信息有效时提取多播方向信息。此处寄存器A的值为10,则路由包需要进行多播,且多播方向为Y方向。S002, extracting the value of the register A in the routing node (2, 1), determining whether to perform the multicast operation according to the value of the register A, and extracting the multicast direction information when the multicast control information is valid. Where the value of register A is 10, the routing packet needs to be multicast, and the multicast direction is in the Y direction.
S003,提取路由节点(2,1)中寄存器B的值,判断寄存器B中是否存在有效的多播步长。此处寄存器B的值为0x02,为有效的多播步长,且多播步长为2。S003, extract the value of the register B in the routing node (2, 1), and determine whether there is a valid multicast step size in the register B. The value of register B here is 0x02, which is a valid multicast step size, and the multicast step size is 2.
S004,根据多播方向信息(Y方向)和多播步长信息(2个步长)确定路由包进行多播的目标节点地址为(2,3),将路由包路由至目标路由节点(2,3),并将路由包中的有效数据发送给与路由节点(2,3)相连的神经形态处理单元。 S004. Determine, according to the multicast direction information (Y direction) and the multicast step information (2 steps), the destination node address of the routing packet for multicasting is (2, 3), and routing the routing packet to the target routing node (2) 3), and send the valid data in the routing packet to the neuromorphic processing unit connected to the routing node (2, 3).
其将多播路由信息(包括多播控制信息和多播步长信息)存储在路由节点中,路由包到达该路由节点时以该路由节点为发送节点按照该路由节点中的路由规则被多播,由于多播路由信息不再包含在路由包中,因此路由包中信息量减少,能够有效提高路由包的路由效率,减少路由包在路由过程对网络资源的占用,且多播路由信息无需在每个生成的路由包中配置,避免了在每个路由包中配置多播路由信息的繁琐。The multicast routing information (including the multicast control information and the multicast step information) is stored in the routing node, and when the routing packet arrives at the routing node, the routing node is multicast by the routing node according to the routing rule in the routing node. Since the multicast routing information is no longer included in the routing packet, the amount of information in the routing packet is reduced, which can effectively improve the routing efficiency of the routing packet, reduce the occupation of the network resource by the routing packet in the routing process, and the multicast routing information does not need to be in the routing information. Configured in each generated routing packet, the tedious task of configuring multicast routing information in each routing packet is avoided.
实施例五Embodiment 5
参见图17,源路由节点(1,0)向目标路由节点(1,1)发送路由包,路由节点(1,1)的寄存器A配置为A[1:0]=01,寄存器B配置为B[7:0]=0x03,则所有以(1,1)为多播路由节点的路由包到达节点(1,1)后,执行以下过程:Referring to Figure 17, the source routing node (1, 0) sends a routing packet to the destination routing node (1, 1). The register A of the routing node (1, 1) is configured as A[1:0] = 01, and the register B is configured as B[7:0]=0x03, after all the routing packets with (1,1) as the multicast routing node arrive at the node (1,1), the following process is performed:
S001,将路由包中的有效数据发送给与路由节点(1,1)相连的神经形态处理单元。S001: Send the valid data in the routing packet to the neuromorphic processing unit connected to the routing node (1, 1).
S002,提取路由节点(1,1)中寄存器A的值,根据寄存器A的值确定是否进行多播操作,并在多播控制信息有效时提取多播方向信息。此处寄存器A的值为01,则路由包需要进行多播,且多播方向为X方向。S002: Extract the value of the register A in the routing node (1, 1), determine whether to perform the multicast operation according to the value of the register A, and extract the multicast direction information when the multicast control information is valid. Here, the value of register A is 01, and the routing packet needs to be multicast, and the multicast direction is the X direction.
S003,提取路由节点(1,1)中寄存器B的值,判断寄存器B中是否存在有效的多播步长。此处寄存器B的值为0x03,为有效的多播步长,且多播步长为3。S003: Extract the value of the register B in the routing node (1, 1), and determine whether there is a valid multicast step size in the register B. The value of register B here is 0x03, which is a valid multicast step size, and the multicast step size is 3.
S004,根据多播方向信息(X方向)和多播步长信息(3个步长)确定路由包进行多播的目标节点地址为(4,1),将路由包路由至目标路由节点(4,1),并将路由包中的有效数据发送给与路由节点(4,1)相连的神经形态处理单元。S004: Determine, according to the multicast direction information (X direction) and the multicast step information (3 steps), the destination node address of the routing packet for multicasting is (4, 1), and routing the routing packet to the target routing node (4) , 1), and send the valid data in the routing packet to the neuromorphic processing unit connected to the routing node (4, 1).
上述多播过程将多播路由信息存储在路由节点中而不是配置在路由包中,路由包中的信息量减少,能够有效提高路由包的路由效率,减少路由包在路由过程对网络资源的占用,且多播路由信息无需在每个生成的路由包中配置,避免了在每个路由包中配置多播路由信息的繁琐。The foregoing multicast process stores the multicast routing information in the routing node instead of being configured in the routing packet, and the amount of information in the routing packet is reduced, which can effectively improve the routing efficiency of the routing packet and reduce the occupation of the network resource by the routing packet in the routing process. The multicast routing information does not need to be configured in each generated routing packet, which avoids the cumbersome configuration of multicast routing information in each routing packet.
其中,需要说明的是,上述实施例一和实施例二中的寄存器B的位宽为8bit,其值为0x02和0x03是以16进制的形式表达的,16进制必须以0x开头,0x02转换为二进制的值为:00000010;0x03转换为二进制的值为:00000011。将寄存器B的值以16进制的形式表达,简单明了。It should be noted that the bit width of the register B in the first embodiment and the second embodiment is 8 bits, and the values of 0x02 and 0x03 are expressed in hexadecimal, and the hexadecimal must start with 0x, 0x02. The value converted to binary is: 00000010; the value converted from 0x03 to binary is: 00000011. The value of register B is expressed in hexadecimal form, which is simple and clear.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory, RAM)等。One of ordinary skill in the art can understand that all or part of the process of implementing the foregoing embodiments can be completed by a computer program to instruct related hardware, and the program can be stored in a computer readable storage medium. When executed, the flow of an embodiment of the methods as described above may be included. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (Random Access Memory). RAM) and so on.
在一个实施例中,如图18所示,还提供了一种基于2D mesh网络的路由多播系统,该系统包括:处理器,该处理器用于执行存储在存储介质中的以下程序模块:In one embodiment, as shown in FIG. 18, a routing multicast system based on a 2D mesh network is also provided, the system comprising: a processor for executing the following program modules stored in a storage medium:
提取模块100’,用于在多播路由节点接收到路由包后,提取多播路由节点本地存储的多播控制信息和多播步长信息。The extracting module 100' is configured to extract multicast control information and multicast step information stored locally by the multicast routing node after the multicast routing node receives the routing packet.
获取模块200’,用于在多播控制信息有效时,提取多播控制信息中的多播方向信息,并获取多播路由节点的当前节点地址。The obtaining module 200' is configured to extract multicast direction information in the multicast control information when the multicast control information is valid, and acquire a current node address of the multicast routing node.
确定模块300’,用于根据当前节点地址以及多播方向信息和多播步长信息确定所述路由包将要路由至的目标路由节点的目标节点地址,并根据目标节点地址将路由包路由至目标路由节点。The determining module 300' is configured to determine, according to the current node address and the multicast direction information and the multicast step information, a target node address of the target routing node to which the routing packet is to be routed, and route the routing packet to the target according to the target node address. Routing node.
本实施例中,将路由包进行路由多播过程的多播控制信息和多播步长信息存储在2Dmesh网络中的路由节点中,这样当存储有多播控制信息和多播步长信息的路由节点接收到路由包后,所有以该路由节点进行路由的路由包均会被多播,而无需在路由包中与多播过程相关的信息,这样可以减少路由包中包含的信息,能够有效提高路由包进行多播路由时的效率,降低多播过程对2D mesh网络资源的占用,提高2D mesh网络资源的利用率。同时,对于一个路由节点与多个神经形态处理单元连接的2D mesh网络,无需在每个路由包生成时都为之配置相应的多播路由信息也能够完成相应的多播过程,可以简单地实现以路由节点为单位的路由包中有效数据的复制,多播过程简单方便。In this embodiment, the multicast control information and the multicast step information of the routing packet for the routing multicast process are stored in the routing node in the 2Dmesh network, so that when the multicast control information and the multicast step information are stored, the route is stored. After receiving the routing packet, all the routing packets routed by the routing node will be multicast, without the information related to the multicast process in the routing packet, which can reduce the information contained in the routing packet and effectively improve the routing packet. The efficiency of routing packets for multicast routing reduces the occupation of 2D mesh network resources by the multicast process and improves the utilization of 2D mesh network resources. At the same time, for a 2D mesh network in which a routing node is connected to multiple neuromorphic processing units, it is not necessary to configure corresponding multicast routing information for each routing packet to complete the corresponding multicasting process, which can be simply implemented. The multicast data in the routing packet is a simple and convenient multicast process.
在一个实施例中,还包括:发送模块100”,用于在赌博路由节点接收到路由包后,获取路由包的有效数据,并将有效数据发送给与多播路由节点连接的神经形态处理单元。In an embodiment, the method further includes: a sending module 100", configured to: after the gambling routing node receives the routing packet, obtain valid data of the routing packet, and send the valid data to the neuromorphic processing unit connected to the multicast routing node. .
在一个实施例中,获取模块200’包括:第一判断单元210’,用于由多播控制信息中提取多播使能信息,并判断多播使能信息是否有效;若是,则进入第二判断单元220’;若否,则进入第一控制单元230’。In an embodiment, the obtaining module 200' includes: a first determining unit 210', configured to extract multicast enabling information from the multicast control information, and determine whether the multicast enabling information is valid; if yes, enter the second The determining unit 220'; if not, entering the first control unit 230'.
第二判断单元220’,用于判断多播步长信息是否存在有效的多播步长,并在存在有效的多播步长时,提取多播控制信息中的多播方向信息及获取多播路由节点的当前节点地址。第一控制单元230’,用于控制路由包结束路由。The second determining unit 220' is configured to determine whether the multicast step information has a valid multicast step size, and when there is a valid multicast step, extract the multicast direction information in the multicast control information and obtain the multicast The current node address of the routing node. The first control unit 230' is configured to control the routing packet to end the route.
在一个实施例中,确定模块300’包括:第三判断单元310’,用于判断所述路由包当前路由至的第一路由节点的第一节点地址是否为目标节点地址;若是,则进入发送判断单元320’;若否,则进入第二控制单元330’。In an embodiment, the determining module 300' includes: a third determining unit 310', configured to determine whether the first node address of the first routing node to which the routing packet is currently routed is a target node address; if yes, enter and send The determining unit 320'; if not, entering the second control unit 330'.
发送判断单元320’,用于将所述路由包中的有效数据发送给与所述目标路由节点连接的 神经形态处理单元,并判断目标路由节点中是否配置了多播控制信息和多播步长信息;若是,则确定所述目标路由节点为多播路由节点,并提取所述多播路由节点存储的所述多播控制信息和所述多播步长信息;若否,则控制路由包结束路由。第二控制单元330’,用于控制所述路由包通过所述2D mesh网络继续路由,直至路由至目标路由节点。a sending determining unit 320', configured to send valid data in the routing packet to the target routing node a neural morphology processing unit, and determining whether multicast control information and multicast step information are configured in the target routing node; if yes, determining that the target routing node is a multicast routing node, and extracting the storage of the multicast routing node The multicast control information and the multicast step information; if not, controlling the routing packet to end the route. The second control unit 330' is configured to control the routing packet to continue routing through the 2D mesh network until routing to the target routing node.
在一个实施例中,从相同的多播路由节点路由的所有路由包具有相同的目标节点地址。In one embodiment, all routing packets routed from the same multicast routing node have the same destination node address.
由于此系统解决问题的原理与前述一种基于2D mesh网络的路由多播方法相似,因此该系统的实施可以参见前述方法的实施,重复之处不再赘述。Since the principle of solving the problem in this system is similar to the foregoing routing multicast method based on the 2D mesh network, the implementation of the system can be referred to the implementation of the foregoing method, and the repeated description is not repeated.
以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above-described embodiments may be arbitrarily combined. For the sake of brevity of description, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction between the combinations of these technical features, All should be considered as the scope of this manual.
以上所述实施例仅表达了本发明的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干变形和改进,这些都属于本发明的保护范围。因此,本发明专利的保护范围应以所附权利要求为准。 The above-mentioned embodiments are merely illustrative of several embodiments of the present invention, and the description thereof is more specific and detailed, but is not to be construed as limiting the scope of the invention. It should be noted that a number of variations and modifications may be made by those skilled in the art without departing from the spirit and scope of the invention. Therefore, the scope of the invention should be determined by the appended claims.

Claims (20)

  1. 一种基于2D mesh网络的路由多播方法,其特征在于,所述方法包括:A routing multicast method based on a 2D mesh network, the method comprising:
    在2D mesh网络的源节点生成路由包时,在所述路由包中分配储存多播使能信息、多播方向信息和多播步长信息的多播控制区段;When a routing packet is generated by a source node of the 2D mesh network, a multicast control section storing multicast enabling information, multicast direction information, and multicast step information is allocated in the routing packet;
    由所述路由包中提取目标节点地址,并根据所述目标节点地址将所述路由包通过路由网络传输至目标节点;Extracting a target node address from the routing packet, and transmitting the routing packet to the target node by using a routing network according to the target node address;
    由所述多播路由区段中提取所述多播使能信息、所述多播方向信息和所述多播步长信息,并根据所述多播使能信息、所述多播方向信息和所述多播步长信息控制所述路由包进行多播路由。Extracting, by the multicast routing section, the multicast enabling information, the multicast direction information, and the multicast step information, and according to the multicast enabling information, the multicast direction information, and The multicast step information controls the routing packet to perform multicast routing.
  2. 根据权利要求1所述的基于2D mesh网络的路由多播方法,其特征在于,所述由所述多播路由区段中提取所述多播使能信息,所述多播方向信息和所述多播步长信息,并根据所述多播使能信息、所述多播方向信息和所述多播步长信息控制所述路由包进行多播路由的步骤包括:The 2D mesh network-based routing multicast method according to claim 1, wherein the multicast enabling information is extracted by the multicast routing section, the multicast direction information, and the The step of multicasting the step information and controlling the routing packet to perform multicast routing according to the multicast enabling information, the multicast direction information, and the multicast step information includes:
    判断所述多播控制区段中的所述多播使能信息是否有效;Determining whether the multicast enable information in the multicast control section is valid;
    若是,则根据所述多播方向信息和所述多播步长信息控制所述路由包进行多播路由;If yes, controlling the routing packet to perform multicast routing according to the multicast direction information and the multicast step information;
    若否,则控制所述路由包结束路由。If not, the routing packet is controlled to end the route.
  3. 根据权利要求2所述的基于2D mesh网络的路由多播方法,其特征在于,所述根据所述多播方向信息和所述多播步长信息控制所述路由包进行多播路由的步骤包括:The 2D mesh network-based routing multicast method according to claim 2, wherein the step of controlling the routing packet to perform multicast routing according to the multicast direction information and the multicast step information comprises: :
    判断所述多播步长信息中是否存在有效的多播步长;Determining whether there is a valid multicast step in the multicast step information;
    若是,则根据所述多播方向信息和所述路由包当前所在的目标节点地址更新所述路由包中的目标节点地址,并返回所述由所述路由包中提取目标节点地址,并根据所述目标节点地址将所述路由包通过路由网络传输至目标节点的步骤;If yes, updating the target node address in the routing packet according to the multicast direction information and the target node address where the routing packet is currently located, and returning the extracted target node address from the routing packet, and according to the The step of transmitting, by the target node address, the routing packet to the target node through the routing network;
    若否,则控制所述路由包结束路由。If not, the routing packet is controlled to end the route.
  4. 根据权利要求3所述的基于2D mesh网络的路由多播方法,其特征在于,在执行所述根据所述多播方向信息和所述路由包当前所在的目标节点地址更新所述路由包中的目标节点地址的步骤的同时,还包括:The 2D mesh network-based routing multicast method according to claim 3, wherein the updating of the routing packet according to the multicast direction information and a target node address where the routing packet is currently located is performed. The steps of the target node address also include:
    更新所述多播控制区段中的多播步长信息。The multicast step size information in the multicast control section is updated.
  5. 根据权利要求1至4任一项所述的基于2D mesh网络的路由多播方法,其特征在于,在将所述路由包输送至目标节点之后,还包括: The routing multicast method based on the 2D mesh network according to any one of claims 1 to 4, further comprising: after the routing packet is delivered to the target node,
    由所述路由包中提取有效负载数据,并将所述有效负载数据发送给所述目标节点连接的本地处理单元。The payload data is extracted from the routing packet, and the payload data is sent to a local processing unit connected to the target node.
  6. 一种基于2D mesh网络的路由多播系统,其特征在于,所述系统包括处理器,所述处理器用于执行存储在存储介质中的以下程序模块:A routing multicast system based on a 2D mesh network, characterized in that the system comprises a processor for executing the following program modules stored in a storage medium:
    分配模块,用于当在2D mesh网络的源节点生成路由包时,在所述路由包中分配储存多播使能信息、多播方向信息和多播步长信息的多播控制区段;An allocating module, configured to allocate a multicast control section storing multicast enabling information, multicast direction information, and multicast step information in the routing packet when generating a routing packet in a source node of the 2D mesh network;
    路由传输模块,用于由所述路由包中提取目标节点地址,并根据所述目标节点地址将所述路由包通过路由网络传输至目标节点;a routing transmission module, configured to extract a target node address from the routing packet, and transmit the routing packet to the target node by using a routing network according to the target node address;
    多播控制模块,用于由所述多播路由区段中提取所述多播使能信息、所述多播方向信息和所述多播步长信息,并根据所述多播使能信息、所述多播方向信息和所述多播步长信息控制所述路由包进行多播路由。a multicast control module, configured to extract, by the multicast routing segment, the multicast enable information, the multicast direction information, and the multicast step information, and according to the multicast enable information, The multicast direction information and the multicast step information control the routing packet for multicast routing.
  7. 根据权利要求6所述的基于2D mesh网络的路由多播系统,其特征在于,所述多播控制模块包括:The routing multicast system based on the 2D mesh network of claim 6, wherein the multicast control module comprises:
    使能判断单元,用于判断所述多播控制区段中的所述多播使能信息是否有效;若是,则进入多播路由单元;若否,则进入路由结束单元;The enabling determining unit is configured to determine whether the multicast enabling information in the multicast control section is valid; if yes, enter a multicast routing unit; if not, enter a routing end unit;
    所述多播路由单元,用于根据所述多播方向信息和所述多播步长信息控制所述路由包进行多播路由;The multicast routing unit is configured to control the routing packet to perform multicast routing according to the multicast direction information and the multicast step information.
    所述路由结束单元,用于控制所述路由包结束路由。The route ending unit is configured to control the routing packet ending route.
  8. 根据权利要求7所述的基于2D mesh网络的路由多播系统,其特征在于,所述多播路由单元包括:The 2D mesh network-based routing multicast system according to claim 7, wherein the multicast routing unit comprises:
    步长判断子单元,用于判断所述多播步长信息中是否存在有效的多播步长;若是,则进入目标地址更新子单元,并返回所述路由传输模块;若否,则进入所述路由结束单元;a step determining subunit, configured to determine whether a valid multicast step size exists in the multicast step information; if yes, enter a target address update subunit, and return the routing transmission module; if not, enter the location Said routing end unit;
    所述目标地址更新子单元,用于根据所述多播方向信息和所述路由包当前所在的目标节点地址更新所述路由包中的目标节点地址。The target address update subunit is configured to update a target node address in the routing packet according to the multicast direction information and a target node address where the routing packet is currently located.
  9. 根据权利要求8所述的基于2D mesh网络的路由多播系统,其特征在于,所述多播路由单元还包括:The routing multicast system based on the 2D mesh network of claim 8, wherein the multicast routing unit further comprises:
    步长更新子单元,用于在根据所述多播方向信息和所述路由包当前所在的目标节点地址更新所述路由包中的目标节点地址的同时,更新所述多播控制区段中的多播步长信息。a step update subunit, configured to update, in the multicast control section, the target node address in the routing packet according to the multicast direction information and a target node address where the routing packet is currently located Multicast step size information.
  10. 根据权利要求6至9任一项所述的基于2D mesh网络的路由多播系统,其特征在于,所述处理器中还包括: The 2D mesh network-based routing multicast system according to any one of claims 6 to 9, wherein the processor further comprises:
    发送模块,用于在将所述路由包输送至目标节点之后,由所述路由包中提取有效负载数据,并将所述有效负载数据发送给所述目标节点连接的本地处理单元。And a sending module, configured to: after the routing packet is delivered to the target node, extract the payload data from the routing packet, and send the payload data to a local processing unit connected to the target node.
  11. 一种基于2D mesh网络的路由多播方法,其特征在于,所述方法包括:A routing multicast method based on a 2D mesh network, the method comprising:
    在多播路由节点接收到路由包后,提取所述多播路由节点本地存储的多播控制信息和多播步长信息;After receiving the routing packet, the multicast routing node extracts multicast control information and multicast step information stored locally by the multicast routing node;
    在所述多播控制信息有效时,提取所述多播控制信息中的多播方向信息,并获取所述多播路由节点的当前节点地址;And when the multicast control information is valid, extracting multicast direction information in the multicast control information, and acquiring a current node address of the multicast routing node;
    根据所述当前节点地址以及所述多播方向信息和所述多播步长信息确定所述路由包将要路由至的目标路由节点的目标节点地址,并根据所述目标节点地址将所述路由包路由至所述目标路由节点。Determining, according to the current node address, the multicast direction information and the multicast step information, a target node address of a target routing node to which the routing packet is to be routed, and routing the routing packet according to the target node address Routed to the target routing node.
  12. 根据权利要求11所述的基于2D mesh网络的路由多播方法,其特征在于,所述在多播路由节点接收到路由包后,还包括:The route multicasting method based on the 2D mesh network according to claim 11, wherein after the routing routing node receives the routing packet, the method further includes:
    获取所述路由包的有效数据,并将所述有效数据发送给与所述多播路由节点连接的神经形态处理单元。Obtaining valid data of the routing packet, and transmitting the valid data to a neuromorphic processing unit connected to the multicast routing node.
  13. 根据权利要求11所述的基于2D mesh网络的路由多播方法,其特征在于,所述在所述多播控制信息有效时,提取所述多播控制信息中的多播方向信息,并获取所述多播路由节点的当前节点地址的步骤包括:The 2D mesh network-based routing multicast method according to claim 11, wherein when the multicast control information is valid, the multicast direction information in the multicast control information is extracted, and the The steps of the current node address of the multicast routing node include:
    由所述多播控制信息中提取多播使能信息,并判断所述多播使能信息是否有效;Extracting multicast enable information from the multicast control information, and determining whether the multicast enable information is valid;
    若是,则判断所述多播步长信息是否存在有效的多播步长,并在存在有效的多播步长时,提取所述多播控制信息中的多播方向信息及获取所述多播路由节点的当前节点地址;If yes, determining whether the multicast step size information has a valid multicast step size, and when there is a valid multicast step size, extracting multicast direction information in the multicast control information and acquiring the multicast The current node address of the routing node;
    若否,则控制所述路由包结束路由。If not, the routing packet is controlled to end the route.
  14. 根据权利要求11所述的基于2D mesh网络的路由多播方法,其特征在于,所述根据所述目标节点地址将所述路由包路由至所述目标路由节点的步骤包括:The 2D mesh network-based routing multicast method according to claim 11, wherein the step of routing the routing packet to the target routing node according to the target node address comprises:
    判断所述路由包当前路由至的第一路由节点的第一节点地址是否为所述目标节点地址;Determining whether the first node address of the first routing node to which the routing packet is currently routed is the target node address;
    若是,则判定所述第一路由节点为所述目标路由节点,将所述路由包中的有效数据发送给与所述目标路由节点连接的神经形态处理单元,并判断所述目标路由节点中是否配置了所述多播控制信息和所述多播步长信息;若是,则确定所述目标路由节点为多播路由节点,并提取所述多播路由节点存储的所述多播控制信息和所述多播步长信息;若否,则控制所述路由包结束路由;If yes, determining that the first routing node is the target routing node, sending valid data in the routing packet to a neuromorphic processing unit connected to the target routing node, and determining whether the target routing node is Configuring the multicast control information and the multicast step information; if yes, determining that the target routing node is a multicast routing node, and extracting the multicast control information and the location stored by the multicast routing node Multicast step size information; if not, controlling the routing packet to end routing;
    若否,则控制所述路由包通过所述2D mesh网络继续路由,直至路由至所述目标路由节 点。If not, controlling the routing packet to continue routing through the 2D mesh network until routing to the target routing section point.
  15. 根据权利要求11至14任一项所述的基于2D mesh网络的路由多播方法,其特征在于,从相同的所述多播路由节点路由的所有路由包具有相同的目标节点地址。The 2D mesh network-based routing multicast method according to any one of claims 11 to 14, wherein all routing packets routed from the same multicast routing node have the same target node address.
  16. 一种基于2D mesh网络的路由多播系统,其特征在于,所述系统包括处理器,所述处理器用于执行存储在存储介质中的以下程序模块:A routing multicast system based on a 2D mesh network, characterized in that the system comprises a processor for executing the following program modules stored in a storage medium:
    提取模块,用于在多播路由节点接收到路由包后,提取所述多播路由节点本地存储的多播控制信息和多播步长信息;An extracting module, configured to: after the routing packet is received by the multicast routing node, extract the multicast control information and the multicast step information stored locally by the multicast routing node;
    获取模块,用于在所述多播控制信息有效时,提取所述多播控制信息中的多播方向信息,并获取所述多播路由节点的当前节点地址;And an acquiring module, configured to: when the multicast control information is valid, extract the multicast direction information in the multicast control information, and obtain a current node address of the multicast routing node;
    确定模块,用于根据所述当前节点地址以及所述多播方向信息和所述多播步长信息确定所述路由包将要路由至的目标路由节点的目标节点地址,并根据所述目标节点地址将所述路由包路由至所述目标路由节点。a determining module, configured to determine, according to the current node address, the multicast direction information, and the multicast step information, a target node address of a target routing node to which the routing packet is to be routed, and according to the target node address Routing the routing packet to the target routing node.
  17. 根据权利要求16所述的基于2D mesh网络的路由多播系统,其特征在于,还包括:The 2D mesh network-based routing multicast system according to claim 16, further comprising:
    发送模块,用于在多播路由节点接收到路由包后,获取所述路由包的有效数据,并将所述有效数据发送给与所述多播路由节点连接的神经形态处理单元。And a sending module, configured to: after the routing packet is received by the multicast routing node, obtain valid data of the routing packet, and send the valid data to a neuromorphic processing unit connected to the multicast routing node.
  18. 根据权利要求16所述的基于2D mesh网络的路由多播系统,其特征在于,所述获取模块包括:The 2D mesh network-based routing multicast system according to claim 16, wherein the obtaining module comprises:
    第一判断单元,用于由所述多播控制信息中提取多播使能信息,并判断所述多播使能信息是否有效;若是,则进入第二判断单元;若否,则进入第一控制单元;a first determining unit, configured to extract multicast enabling information from the multicast control information, and determine whether the multicast enabling information is valid; if yes, enter a second determining unit; if not, enter the first control unit;
    所述第二判断单元,用于判断所述多播步长信息是否存在有效的多播步长,并在存在有效的多播步长时,提取所述多播控制信息中的多播方向信息及获取所述多播路由节点的当前节点地址;The second determining unit is configured to determine whether the multicast step size information has a valid multicast step size, and extract the multicast direction information in the multicast control information when there is a valid multicast step size And obtaining a current node address of the multicast routing node;
    所述第一控制单元,用于控制所述路由包结束路由。The first control unit is configured to control the routing packet to end routing.
  19. 根据权利要求16所述的基于2D mesh网络的路由多播系统,其特征在于,所述确定模块包括:The 2D mesh network-based routing multicast system according to claim 16, wherein the determining module comprises:
    第三判断单元,用于判断所述路由包当前路由至的第一路由节点的第一节点地址是否为所述目标节点地址;若是,则进入发送判断单元;若否,则进入第二控制单元;a third determining unit, configured to determine whether the first node address of the first routing node to which the routing packet is currently routed is the target node address; if yes, enter a sending determining unit; if not, enter the second control unit ;
    所述发送判断单元,用于将所述路由包中的有效数据发送给与所述目标路由节点连接的神经形态处理单元,并判断所述目标路由节点中是否配置了所述多播控制信息和所述多播步长信息;若是,则确定所述目标路由节点为多播路由节点,并提取所述多播路由节点存储的 所述多播控制信息和所述多播步长信息;若否,则控制所述路由包结束路由;The sending determining unit is configured to send valid data in the routing packet to a neuromorphic processing unit connected to the target routing node, and determine whether the multicast control information is configured in the target routing node. The multicast step information; if yes, determining that the target routing node is a multicast routing node, and extracting the storage of the multicast routing node The multicast control information and the multicast step information; if not, controlling the routing packet to end routing;
    所述第二控制单元,用于控制所述路由包通过所述2D mesh网络继续路由,直至路由至所述目标路由节点。The second control unit is configured to control the routing packet to continue to be routed through the 2D mesh network until routing to the target routing node.
  20. 根据权利要求16至19任一项所述的基于2D mesh网络的路由多播系统,其特征在于,从相同的所述多播路由节点路由的所有路由包具有相同的目标节点地址。 The 2D mesh network-based routing multicast system according to any one of claims 16 to 19, characterized in that all routing packets routed from the same multicast routing node have the same target node address.
PCT/CN2017/099583 2016-09-20 2017-08-30 Routing multicast method and system based on 2d mesh network WO2018054201A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN201610834604.5 2016-09-20
CN201610834604.5A CN106341331B (en) 2016-09-20 2016-09-20 Routing multicast method and system based on 2D mesh network
CN201611102312.9 2016-12-05
CN201611102312.9A CN106789675B (en) 2016-12-05 2016-12-05 Routing multicast method and system based on 2D mesh network

Publications (1)

Publication Number Publication Date
WO2018054201A1 true WO2018054201A1 (en) 2018-03-29

Family

ID=61690154

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/099583 WO2018054201A1 (en) 2016-09-20 2017-08-30 Routing multicast method and system based on 2d mesh network

Country Status (1)

Country Link
WO (1) WO2018054201A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111310906A (en) * 2018-12-11 2020-06-19 清华大学 Method, device and equipment for calculating layout of cores in neuromorphic chip
CN114363246A (en) * 2020-09-30 2022-04-15 北京灵汐科技有限公司 Many-core network-on-chip data transmission method, device, equipment and medium
CN114363245A (en) * 2020-09-30 2022-04-15 北京灵汐科技有限公司 Many-core network-on-chip data transmission method, device, equipment and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020085498A1 (en) * 2000-12-28 2002-07-04 Koji Nakamichi Device and method for collecting traffic information
CN101558676A (en) * 2006-10-23 2009-10-14 泰克迪亚科技公司 Method and communication device for routing unicast and multicast messages in an ad-hoc wireless network
CN101827038A (en) * 2010-05-24 2010-09-08 杭州华三通信技术有限公司 Distributed equipment and method for forwarding message in distributed equipment
CN106341331A (en) * 2016-09-20 2017-01-18 清华大学 Routing multicast method and system based on 2D mesh network
CN106789675A (en) * 2016-12-05 2017-05-31 清华大学 Routing multicast method and system based on 2D mesh networks

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020085498A1 (en) * 2000-12-28 2002-07-04 Koji Nakamichi Device and method for collecting traffic information
CN101558676A (en) * 2006-10-23 2009-10-14 泰克迪亚科技公司 Method and communication device for routing unicast and multicast messages in an ad-hoc wireless network
CN101827038A (en) * 2010-05-24 2010-09-08 杭州华三通信技术有限公司 Distributed equipment and method for forwarding message in distributed equipment
CN106341331A (en) * 2016-09-20 2017-01-18 清华大学 Routing multicast method and system based on 2D mesh network
CN106789675A (en) * 2016-12-05 2017-05-31 清华大学 Routing multicast method and system based on 2D mesh networks

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111310906A (en) * 2018-12-11 2020-06-19 清华大学 Method, device and equipment for calculating layout of cores in neuromorphic chip
CN114363246A (en) * 2020-09-30 2022-04-15 北京灵汐科技有限公司 Many-core network-on-chip data transmission method, device, equipment and medium
CN114363245A (en) * 2020-09-30 2022-04-15 北京灵汐科技有限公司 Many-core network-on-chip data transmission method, device, equipment and medium
CN114363245B (en) * 2020-09-30 2024-04-26 北京灵汐科技有限公司 Multi-core network-on-chip data transmission method, device, equipment and medium

Similar Documents

Publication Publication Date Title
US9548945B2 (en) Matrix of on-chip routers interconnecting a plurality of processing engines and a method of routing using thereof
WO2018054201A1 (en) Routing multicast method and system based on 2d mesh network
US20150304212A1 (en) Method and apparatus for matching flow table, and switch
US10742697B2 (en) Packet forwarding apparatus for handling multicast packet
US10355971B2 (en) System and method for data path validation and verification
US20200153728A1 (en) Multicast Forwarding Method and Related Device
WO2019184653A1 (en) Link configuration method and controller
WO2019128699A1 (en) Flow table-based data transfer method
EP3559833B1 (en) Best-efforts database functions
JP2013515407A (en) Method and apparatus for processing multicast packets
BR112015032592B1 (en) SCHEDULED SERVICE PROCESSING METHOD, NETWORK LAYER CONTROLLER, APPLICATION LAYER CONTROLLER AND SCHEDULED SERVICE PROCESSING SYSTEM
CN106789675B (en) Routing multicast method and system based on 2D mesh network
CN101471879A (en) Path control system and method for layering ordered address grouping network
US8509233B2 (en) Method and apparatus for requesting multicast, processing and assisting multicast request
CN106341331B (en) Routing multicast method and system based on 2D mesh network
EP2712478B1 (en) Internet group management protocol version three for quality of service support
JP7127537B2 (en) Transport network control device, communication system, transfer node control method and program
CN111464441A (en) Communication method and device
CN114363246A (en) Many-core network-on-chip data transmission method, device, equipment and medium
CN114363245B (en) Multi-core network-on-chip data transmission method, device, equipment and medium
CN109644158B (en) Software defined network system for distinguishing message entering message
US6868071B1 (en) System and method of transmitting data frames in a mesh of data switches
CN112333221B (en) Network system, method and communication equipment for centralized processing of network service
CN112532527B (en) Routing control method and artificial intelligence processor
WO2021143660A1 (en) Method and apparatus for data transmission

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17852270

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17852270

Country of ref document: EP

Kind code of ref document: A1